Windows uses errno for WSAETIMEDOUT
diff --git a/util.h b/util.h
index 8127e78..b8a5a39 100644
--- a/util.h
+++ b/util.h
@@ -43,7 +43,7 @@
}
static inline bool sock_timeout(void)
{
- return (WSAGetLastError() == WSAETIMEDOUT);
+ return (errno == WSAETIMEDOUT);
}
#ifndef SHUT_RDWR
#define SHUT_RDWR SD_BOTH