mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -04:00
Check return value for ioctlsocket on win32
This commit is contained in:
parent
f13e449b53
commit
f5ad31c186
7
evutil.c
7
evutil.c
@ -266,8 +266,11 @@ evutil_make_socket_nonblocking(evutil_socket_t fd)
|
|||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
{
|
{
|
||||||
unsigned long nonblocking = 1;
|
u_long nonblocking = 1;
|
||||||
ioctlsocket(fd, FIONBIO, (unsigned long*) &nonblocking);
|
if (ioctlsocket(fd, FIONBIO, &nonblocking) == SOCKET_ERROR) {
|
||||||
|
event_warn("fcntl(%d, F_GETFL)", (int)fd);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user