COMP: If both tests are succesfull, prevent compiler error
This commit is contained in:
parent
8732505a17
commit
7d0b2eabd6
@ -132,6 +132,7 @@ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */
|
|||||||
{
|
{
|
||||||
#undef SETBLOCK
|
#undef SETBLOCK
|
||||||
#ifdef HAVE_O_NONBLOCK
|
#ifdef HAVE_O_NONBLOCK
|
||||||
|
{
|
||||||
/* most recent unix versions */
|
/* most recent unix versions */
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
@ -140,15 +141,18 @@ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */
|
|||||||
return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
|
return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
|
||||||
else
|
else
|
||||||
return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
|
return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
|
||||||
|
}
|
||||||
#define SETBLOCK 1
|
#define SETBLOCK 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FIONBIO
|
#ifdef HAVE_FIONBIO
|
||||||
|
{
|
||||||
/* older unix versions */
|
/* older unix versions */
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
flags = nonblock;
|
flags = nonblock;
|
||||||
return ioctl(sockfd, FIONBIO, &flags);
|
return ioctl(sockfd, FIONBIO, &flags);
|
||||||
|
}
|
||||||
#define SETBLOCK 2
|
#define SETBLOCK 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user