diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-07-05 05:01:00 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-07-05 05:01:00 -0400 |
commit | e9b33ed1bf4140e3aeda5eb9126027fbe5a3ec5a (patch) | |
tree | c39a2423bf87c145677fb79a00d670a2b05863b0 /src/common | |
parent | d13389b30ec2e17a8f08a00f82fac420ae968cd1 (diff) | |
download | tor-e9b33ed1bf4140e3aeda5eb9126027fbe5a3ec5a.tar.gz tor-e9b33ed1bf4140e3aeda5eb9126027fbe5a3ec5a.zip |
On windows, ENOBUFS starts with WSA. #6296. Fix on 0.2.18-rc
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 4efb0c8b8c..42648bb04b 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -500,6 +500,8 @@ int network_init(void); * the actual errno after a socket operation fails. */ #if defined(_WIN32) +/** Expands to WSA<b>e</b> on Windows, and to <b>e</b> elsewhere. */ +#define SOCK_ERRNO(e) WSA##e /** Return true if e is EAGAIN or the local equivalent. */ #define ERRNO_IS_EAGAIN(e) ((e) == EAGAIN || (e) == WSAEWOULDBLOCK) /** Return true if e is EINPROGRESS or the local equivalent. */ @@ -520,6 +522,7 @@ int network_init(void); int tor_socket_errno(tor_socket_t sock); const char *tor_socket_strerror(int e); #else +#define SOCK_ERRNO(e) e #define ERRNO_IS_EAGAIN(e) ((e) == EAGAIN) #define ERRNO_IS_EINPROGRESS(e) ((e) == EINPROGRESS) #define ERRNO_IS_CONN_EINPROGRESS(e) ((e) == EINPROGRESS) |