Check for poll when looking for _POLL_EMUL_H_
This commit is contained in:
parent
8d36890723
commit
44fca8b51a
|
@ -78,7 +78,7 @@
|
||||||
*/
|
*/
|
||||||
int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
|
int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
|
||||||
{
|
{
|
||||||
#if !defined(_POLL_EMUL_H_) || defined(CURL_HAVE_WSAPOLL)
|
#if (defined(HAVE_POLL) && !defined(_POLL_EMUL_H_)) || defined(CURL_HAVE_WSAPOLL)
|
||||||
struct pollfd pfd[2];
|
struct pollfd pfd[2];
|
||||||
int num;
|
int num;
|
||||||
int r;
|
int r;
|
||||||
|
@ -96,7 +96,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _POLL_EMUL_H_
|
#if defined(HAVE_POLL) && !defined(_POLL_EMUL_H_)
|
||||||
do {
|
do {
|
||||||
r = poll(pfd, num, timeout_ms);
|
r = poll(pfd, num, timeout_ms);
|
||||||
} while((r == -1) && (errno == EINTR));
|
} while((r == -1) && (errno == EINTR));
|
||||||
|
|
Loading…
Reference in New Issue