[master] 390c19e Polish
Federico G. Schwindt
fgsch at lodoss.net
Fri Dec 18 15:44:27 CET 2015
commit 390c19ebde531ff3a890d0e5ea6ae117177999a1
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Fri Dec 18 13:55:49 2015 +0000
Polish
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 0c6a312..09bf909 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -324,10 +324,10 @@ VTCP_close(int *s)
void
VTCP_set_read_timeout(int s, double seconds)
{
+#ifdef SO_RCVTIMEO_WORKS
struct timeval timeout;
timeout.tv_sec = (int)floor(seconds);
timeout.tv_usec = (int)(1e6 * (seconds - timeout.tv_sec));
-#ifdef SO_RCVTIMEO_WORKS
/*
* Solaris bug (present at least in snv_151 and older): If this fails
* with EINVAL, the socket is half-closed (SS_CANTSENDMORE) and the
@@ -338,6 +338,7 @@ VTCP_set_read_timeout(int s, double seconds)
&timeout, sizeof timeout));
#else
(void)s;
+ (void)seconds;
#endif
}
More information about the varnish-commit
mailing list