mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-13 06:16:10 -04:00
Fix compilation of recent error code with win32.
svn:r937
This commit is contained in:
parent
de069b9977
commit
fded0a8783
4
evutil.c
4
evutil.c
@ -305,10 +305,10 @@ evutil_socket_error_to_string(int errcode)
|
|||||||
/* XXXX Is there really no built-in function to do this? */
|
/* XXXX Is there really no built-in function to do this? */
|
||||||
int i;
|
int i;
|
||||||
for (i=0; windows_socket_errors[i].code >= 0; ++i) {
|
for (i=0; windows_socket_errors[i].code >= 0; ++i) {
|
||||||
if (e == windows_socket_errors[i].code)
|
if (errcode == windows_socket_errors[i].code)
|
||||||
return windows_socket_errors[i].msg;
|
return windows_socket_errors[i].msg;
|
||||||
}
|
}
|
||||||
return strerror(e);
|
return strerror(errcode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
2
signal.c
2
signal.c
@ -300,7 +300,7 @@ evsignal_handler(int sig)
|
|||||||
send(evsignal_base->sig.ev_signal_pair[0], "a", 1, 0);
|
send(evsignal_base->sig.ev_signal_pair[0], "a", 1, 0);
|
||||||
errno = save_errno;
|
errno = save_errno;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
EVUTIL_SET_SOCKET_ERRNO(socket_error);
|
EVUTIL_SET_SOCKET_ERROR(socket_errno);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user