[distcc] A patch to make it compile on BSD/OS

Nick Amato naamato at nexthop.com
Tue Sep 16 16:39:38 GMT 2003


Martin Pool wrote:
> On 15 Sep 2003 Nick Amato <naamato at nexthop.com> wrote:
> 
> 
>>Attached is a simple diff to make distcc-2.10.1 compile under BSD/OS 4.2. 
>>Alternatively you could just use getpgrp(2) instead of getpgid(2) all the 
>>time, since it is the POSIX version.
> 
> 
> I think that will be fine, unless somebody reports that they're
> missing getgrp().
> 
> Thanks for the suggestion.  This will be in the next release.


Here's another diff to make distccd detect the number of CPUs in BSD/OS. 
Without this I was getting results such as:

Sep 16 11:58:34 machine user[5]: distccd[6121]: (dcc_ncpus) ERROR:
sysconf(_SC_NPROCESSORS_ONLN) failed: No such file or directory

Sep 16 11:58:34 machine user[5]: distccd[6121]:
(dcc_standalone_server) allowing up to -3 active jobs

Maybe this means distccd will go out and find things to compile, so that 3 
jobs will always be running. :-)

Thanks again!

Nick Amato
naamato at nexthop.com
-------------- next part --------------
--- ncpus.c.bak	Wed Jun 11 22:33:37 2003
+++ ncpus.c	Tue Sep 16 12:26:57 2003
@@ -90,7 +90,7 @@
      return 0;
 }
 
-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__bsdi__)
 
 /* http://www.FreeBSD.org/cgi/man.cgi?query=sysctl&sektion=3&manpath=FreeBSD+4.6-stable
    http://www.openbsd.org/cgi-bin/man.cgi?query=sysctl&sektion=3&manpath=OpenBSD+Current


More information about the distcc mailing list