Fix compilation of recent error code with win32.

svn:r937
This commit is contained in:
Nick Mathewson 2008-09-05 16:47:04 +00:00
parent de069b9977
commit fded0a8783
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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
} }