summaryrefslogtreecommitdiff
path: root/src/ext/eventdns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/eventdns.c')
-rw-r--r--src/ext/eventdns.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ext/eventdns.c b/src/ext/eventdns.c
index 7e99f55626..b1f586b2fb 100644
--- a/src/ext/eventdns.c
+++ b/src/ext/eventdns.c
@@ -368,7 +368,11 @@ error_is_eagain(int err)
#define CLOSE_SOCKET(x) closesocket(x)
#else
#define last_error(sock) (errno)
+#if EAGAIN != EWOULDBLOCK
+#define error_is_eagain(err) ((err) == EAGAIN || (err) == EWOULDBLOCK)
+#else
#define error_is_eagain(err) ((err) == EAGAIN)
+#endif
#define CLOSE_SOCKET(x) close(x)
#endif