Commit ab045277 authored by Federico G. Schwindt's avatar Federico G. Schwindt Committed by Lasse Karstensen

Polish

parent f4f0fa33
...@@ -324,10 +324,10 @@ VTCP_close(int *s) ...@@ -324,10 +324,10 @@ VTCP_close(int *s)
void void
VTCP_set_read_timeout(int s, double seconds) VTCP_set_read_timeout(int s, double seconds)
{ {
#ifdef SO_RCVTIMEO_WORKS
struct timeval timeout; struct timeval timeout;
timeout.tv_sec = (int)floor(seconds); timeout.tv_sec = (int)floor(seconds);
timeout.tv_usec = (int)(1e6 * (seconds - timeout.tv_sec)); 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 * Solaris bug (present at least in snv_151 and older): If this fails
* with EINVAL, the socket is half-closed (SS_CANTSENDMORE) and the * with EINVAL, the socket is half-closed (SS_CANTSENDMORE) and the
...@@ -338,6 +338,7 @@ VTCP_set_read_timeout(int s, double seconds) ...@@ -338,6 +338,7 @@ VTCP_set_read_timeout(int s, double seconds)
&timeout, sizeof timeout)); &timeout, sizeof timeout));
#else #else
(void)s; (void)s;
(void)seconds;
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment