1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../kiss/compile.patch.dietlibc
5 # Copyright (C) 2004 - 2016 The T2 SDE Project
6 # Copyright (C) 1998 - 2004 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
16 # --- T2-COPYRIGHT-NOTE-END ---
19 The dietlibc getcwd function does not (yet) support the GNU extension to
20 allocate the string on-the-fly. So we use some sub-optimal aolution and
21 additional checks. WAIT_ANY should also be added to the dietlibc ...
23 Rene Rebe <rene@exactcode.de>
25 diff -ur kiss-0.21/src/getprompt.c src.kiss.-1.25906.3396530713/kiss-0.21/src/getprompt.c
26 --- kiss-0.21/src/getprompt.c 1998-09-25 14:07:10.000000000 +0200
27 +++ kiss-0.21/src/getprompt.c 2003-08-18 02:12:51.000000000 +0200
40 twobuf [2] = { 0, 0 };
42 - cwd = getcwd (NULL, 0);
43 + getcwd (cwd, LINELEN);
44 if (! flags.noenviron)
45 addtoenv ("PWD", cwd);
48 strcat (buf, username);
56 - twobuf [0] = *prompt;
57 - strcat (buf, twobuf);
58 + strcat (buf, prompt);
63 - twobuf [0] = *prompt;
64 + twobuf [0] = *prompt;
75 diff -ur kiss-0.21/src/waitforchild.c src.kiss.-1.25906.3396530713/kiss-0.21/src/waitforchild.c
76 --- kiss-0.21/src/waitforchild.c 1998-09-25 14:07:10.000000000 +0200
77 +++ kiss-0.21/src/waitforchild.c 2003-08-17 23:16:10.000000000 +0200
79 reportstatus (childname, status, background);
81 /* let's see how generic kids are doing */
82 - while ( (pid = waitpid (WAIT_ANY, &status, WNOHANG)) > 0 )
83 + while ( (pid = waitpid (-1, &status, WNOHANG)) > 0 )
85 sprintf (buf, "pid %d", pid);
86 reportstatus (buf, status, 1);