mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix from Chris Davis: get error-logging to be happy on win32.
svn:r1473
This commit is contained in:
parent
904b5721cb
commit
e9098203f7
@ -412,8 +412,9 @@ test_evutil_log(void *ptr)
|
||||
fd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
#ifdef WIN32
|
||||
evutil_snprintf(buf, sizeof(buf),
|
||||
"Unhappy socket: Resource temporarily unavailable");
|
||||
EVUTIL_SET_SOCKET_ERROR(fd, WSAEWOULDBLOCK);
|
||||
"Unhappy socket: %s",
|
||||
evutil_socket_error_to_string(WSAEWOULDBLOCK));
|
||||
EVUTIL_SET_SOCKET_ERROR(WSAEWOULDBLOCK);
|
||||
#else
|
||||
evutil_snprintf(buf, sizeof(buf),
|
||||
"Unhappy socket: %s", strerror(EAGAIN));
|
||||
@ -425,7 +426,7 @@ test_evutil_log(void *ptr)
|
||||
RESET();
|
||||
|
||||
#ifdef WIN32
|
||||
EVUTIL_SET_SOCKET_ERROR(fd, WSAEWOULDBLOCK);
|
||||
EVUTIL_SET_SOCKET_ERROR(WSAEWOULDBLOCK);
|
||||
#else
|
||||
errno = EAGAIN;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user