[distcc] 2.15 compile error on Mac OS X 10.2

Martin Pool mbp at sourcefrog.net
Wed Jul 7 04:28:49 GMT 2004


On  6 Jul 2004, Benjamin Reed <rangerrick at gmail.com> wrote:
> I'm getting the following error on OSX 10.2 with gcc 3.3 (although the
> same code builds fine on 10.3 with gcc 3.3 as well):
> 
> ---(snip!)---
> gcc -no-cpp-precomp -I./src -I./lzo -I/sw/include -DHAVE_CONFIG_H
> -D_GNU_SOURCE -I./src -DSYSCONFDIR="\"/sw/etc\""
> -DPKGDATADIR="\"/sw/share/distcc\"" -Isrc -I./lzo -g -O2 -W -Wall
> -Wimplicit -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings
> -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
> -Wnested-externs -o src/dparent.o -c src/dparent.c
> src/dparent.c: In function `dcc_log_child_exited':
> src/dparent.c:161: warning: pointer/integer type mismatch in
> conditional expression
> src/dparent.c:161: error: parse error before ':' token
> make: *** [src/dparent.o] Error 1
> ---(snip!)---
> 
> Any ideas?

I think this should fix it:

--- orig/src/dparent.c
+++ mod/src/dparent.c
@@ -154,13 +154,8 @@
         int sig = WTERMSIG(status);
         int severity = sig == SIGTERM ? RS_LOG_INFO : RS_LOG_ERR;
         
-#ifdef HAVE_STRSIGNAL
-        /* take off every sig! for great justice. */
-        rs_log(severity, "child %d: %s", (int) kid, strsignal(sig));
-#else
         rs_log(severity, "child %d: signal %d (%s)", (int) kid, sig,
-               WCOREDUMP(status) ? : "core dumped" : "no core");
-#endif
+               WCOREDUMP(status) ? "core dumped" : "no core");
     } else if (WIFEXITED(status)) {
         rs_log_info("child %d exited: exit status %d",
                     (int) kid, WEXITSTATUS(status));

-- 
Martin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/distcc/attachments/20040707/fcf311e3/attachment.bin


More information about the distcc mailing list