mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 03:44:22 -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
|
||||
{
|
||||
unsigned long nonblocking = 1;
|
||||
ioctlsocket(fd, FIONBIO, (unsigned long*) &nonblocking);
|
||||
u_long nonblocking = 1;
|
||||
if (ioctlsocket(fd, FIONBIO, &nonblocking) == SOCKET_ERROR) {
|
||||
event_warn("fcntl(%d, F_GETFL)", (int)fd);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user