mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +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);
|
fd = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
evutil_snprintf(buf, sizeof(buf),
|
evutil_snprintf(buf, sizeof(buf),
|
||||||
"Unhappy socket: Resource temporarily unavailable");
|
"Unhappy socket: %s",
|
||||||
EVUTIL_SET_SOCKET_ERROR(fd, WSAEWOULDBLOCK);
|
evutil_socket_error_to_string(WSAEWOULDBLOCK));
|
||||||
|
EVUTIL_SET_SOCKET_ERROR(WSAEWOULDBLOCK);
|
||||||
#else
|
#else
|
||||||
evutil_snprintf(buf, sizeof(buf),
|
evutil_snprintf(buf, sizeof(buf),
|
||||||
"Unhappy socket: %s", strerror(EAGAIN));
|
"Unhappy socket: %s", strerror(EAGAIN));
|
||||||
@ -425,7 +426,7 @@ test_evutil_log(void *ptr)
|
|||||||
RESET();
|
RESET();
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
EVUTIL_SET_SOCKET_ERROR(fd, WSAEWOULDBLOCK);
|
EVUTIL_SET_SOCKET_ERROR(WSAEWOULDBLOCK);
|
||||||
#else
|
#else
|
||||||
errno = EAGAIN;
|
errno = EAGAIN;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user