summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers@khanacademy.org>2008-04-28 19:23:31 +0000
committerCraig Silverstein <csilvers@khanacademy.org>2008-04-28 19:23:31 +0000
commitf1373cdf3c33752ec326c9b79378057367836c4c (patch)
tree23ff4c261920076e35ad67354f7e8385fdd7255d /src/io.c
parent4bf85961c09d34336f9b081cd923a9f59fcf5266 (diff)
downloaddistcc-git-f1373cdf3c33752ec326c9b79378057367836c4c.tar.gz
These changes are enough to get code to compile, and at least some of
the unittests to pass, on FreeBSD 6.0, Solaris 10 x86, and OS X Leopard. You have to use gmake instead of standard bsd make, though, because neither bsd nor solari make understand 'include */*.d' and 'CFLAGS += $(POPT_FLAGS).' These may be fixable later. Most changes fall into four categories: 1) #include differences 2) New errors due to some #ifdef paths being taken differently 3) Undefined functions (see, eg, the new HAVE_STRSEP) 4) Type differences (eg tv_usec is an int on os x, not a long int) As one concrete example, snprintf.c is an empty file on linux, where all the functionality is part of glibc. But on Solaris, some of its functionality is useful. This turned up a bug where if you have vsnprintf on your system but not vasnprintf, then dopr() was not being used but was being defined, leading to an "unused static function" warning in gcc. As another, solaris would complain about "index" being used as a variable, since it's also a function name. The var was renamed idx. Tested by compiling on FreeBSD, Solaris 10, and OS X leopard (x86). I also compiled and ran unittests under Linux Ubuntu, to make sure this change didn't break anything there. Reviewed by fergus@google.com
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/io.c b/src/io.c
index 80dc5f2..691db7d 100644
--- a/src/io.c
+++ b/src/io.c
@@ -239,12 +239,12 @@ int dcc_writex(int fd, const void *buf, size_t len)
*
* This is a no-op if we don't think this platform has corks.
**/
-int tcp_cork_sock(int fd, int corked)
+int tcp_cork_sock(int POSSIBLY_UNUSED(fd), int POSSIBLY_UNUSED(corked))
{
-#ifdef TCP_CORK
+#ifdef TCP_CORK
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)