[distcc] FreeBSD patch to distcc-0.4

Claes Wallin clawa570 at cyd.liu.se
Tue Jun 11 03:13:02 GMT 2002


Apparently, mknod doesn't work exactly the same on FreeBSD and Linux.
Without this fix, distcc-0.4 won't work on my FreeBSD 4.5 box (it has
to be root to use mknod, and even then it doesn't seem to do its stuff).
Now it works just fine in both FreeBSD and Linux.

    /Clacke

diff -Nurb distcc-0.4/src/serve.c distcc-0.4-freebsd/src/serve.c
--- distcc-0.4/src/serve.c      Sat Jun  8 16:22:02 2002
+++ distcc-0.4-freebsd/src/serve.c      Tue Jun 11 11:47:27 2002
@@ -189,7 +189,7 @@
      *
      * XXX: Perhaps this should be optional so that we can compare
      * performance each way? */
-    if (mknod(temp_i, S_IFIFO|S_IRUSR|S_IWUSR, 0) == -1) {
+    if (mkfifo(temp_i, S_IRUSR|S_IWUSR) == -1) {
         rs_log_error("failed to make fifo %s: %s", temp_i,
                      strerror(errno));
         goto failed;





More information about the distcc mailing list