Re: Issue 93 in distcc: build failed on OpenSolaris env

6 views
Skip to first unread message

Fergus Henderson

unread,
Jan 25, 2012, 7:32:05 AM1/25/12
to Craig Silverstein, distcc-...@googlegroups.com
Hi Craig,

Could you please review the following patch?
This addresses a build failure on an obscure platform -- see http://code.google.com/p/distcc/issues/detail?id=93.

svn diff --diff-cmd diff -x -U8 src/io.c 
Index: src/io.c
===================================================================
--- src/io.c (revision 750)
+++ src/io.c (working copy)
@@ -256,17 +256,17 @@
 /**
  * Stick a TCP cork in the socket.  It's not clear that this will help
  * performance, but it might.
  *
  * This is a no-op if we don't think this platform has corks.
  **/
 int tcp_cork_sock(int POSSIBLY_UNUSED(fd), int POSSIBLY_UNUSED(corked))
 {
-#ifdef TCP_CORK
+#if defined(TCP_CORK) && defined(SOL_TCP)
     if (!dcc_getenv_bool("DISTCC_TCP_CORK", 1))
         return 0;
 
     if (setsockopt(fd, SOL_TCP, TCP_CORK, &corked, sizeof corked) == -1) {
         if (errno == ENOSYS || errno == ENOTSUP) {
             if (corked)
                 rs_trace("no corks allowed on fd%d", fd);
             /* no need to complain about not uncorking */


--
Fergus Henderson <fer...@google.com>

"Defend the user, exclude no one, and create magic." -- Eric Schmidt.


Craig Silverstein

unread,
Jan 25, 2012, 12:12:52 PM1/25/12
to Fergus Henderson, distcc-...@googlegroups.com
Looks good to me. Seems obviously right.

craig

Reply all
Reply to author
Forward
0 new messages