[distcc] A patch to make it compile on BSD/OS
Nick Amato
naamato at nexthop.com
Mon Sep 15 17:37:04 GMT 2003
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. BSD/OS 4.2 does not support getpgid(2).
Thanks!
Nick Amato
naamato at nexthop.com
-------------- next part --------------
--- exec.c.bak Mon Sep 15 13:34:16 2003
+++ exec.c Mon Sep 15 13:26:08 2003
@@ -199,7 +199,11 @@
/* If we're a session group leader, then we are not able to call
* setpgid(). However, setsid will implicitly have put us into a new
* process group, so we don't have to do anything. */
+#ifdef HAVE_GETPGID
if (getpgid(0) == getpid()) {
+#else
+ if (getpgrp() == getpid()) {
+#endif /* HAVE_GETPGID */
rs_trace("already a process group leader");
return 0;
}
--- configure.ac.bak Mon Sep 15 13:33:00 2003
+++ configure.ac Mon Sep 15 13:21:08 2003
@@ -225,7 +225,7 @@
AC_CHECK_FUNCS([getuid geteuid mcheck wait4 wait3 waitpid setgroups getcwd])
AC_CHECK_FUNCS([snprintf vsnprintf vasprintf asprintf getcwd getwd])
AC_CHECK_FUNCS([getrusage strsignal gettimeofday])
-AC_CHECK_FUNCS([getaddrinfo getnameinfo inet_ntop inet_ntoa])
+AC_CHECK_FUNCS([getaddrinfo getnameinfo getpgid inet_ntop inet_ntoa])
AC_CHECK_FUNCS([strndup mmap])
AC_CHECK_DECLS([snprintf, vsnprintf, vasprintf, asprintf, strndup])
More information about the distcc
mailing list