Minix 3 doesn't have MSG_PEEK

This commit is contained in:
Dan Fandrich
2006-08-08 18:47:14 +00:00
parent 6201dc083a
commit 997a987943

View File

@@ -209,12 +209,15 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
if (!Curl_ssl_check_cxn(data->state.connects[data->state.lastconnect])) if (!Curl_ssl_check_cxn(data->state.connects[data->state.lastconnect]))
*param_longp = -1; /* FIN received */ *param_longp = -1; /* FIN received */
} }
/* Minix 3.1 doesn't support any flags on recv; just assume socket is OK */
#ifdef MSG_PEEK
else { else {
/* use the socket */ /* use the socket */
if(recv((int)data->state.connects[data->state.lastconnect]-> if(recv((int)data->state.connects[data->state.lastconnect]->
sock[FIRSTSOCKET], (void*)&buf, 1, MSG_PEEK) == 0) sock[FIRSTSOCKET], (void*)&buf, 1, MSG_PEEK) == 0)
*param_longp = -1; /* FIN received */ *param_longp = -1; /* FIN received */
} }
#endif
} }
else else
*param_longp = -1; *param_longp = -1;