summaryrefslogtreecommitdiff
path: root/src/w32-sock-nonce.inc.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-01-27 17:09:48 +0100
committerWerner Koch <wk@gnupg.org>2015-01-27 17:09:48 +0100
commitab5264b20f75a4dcc8baf2e672394d3a84c60870 (patch)
treedb74da7704abab0836fd6be685097c688db7202f /src/w32-sock-nonce.inc.h
parent054f7c27916ffc4d4937dd68775a547e204882fe (diff)
downloadlibassuan-ab5264b20f75a4dcc8baf2e672394d3a84c60870.tar.gz
Fix WSAEADDRINUSE EADDRINUSE mismatch.
* src/w32-sock-nonce.inc.h (EADDRINUSE): Avoid redefining. * src/assuan-socket.c (_assuan_sock_bind): Set error to EADDRINUSE. -- With the latest mingw-w64 EADDRINUSE is defined but to a different value than WSAEADDRINUSE. We need to use EADDRINUSE becuase that is what applications expect. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/w32-sock-nonce.inc.h')
-rw-r--r--src/w32-sock-nonce.inc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/w32-sock-nonce.inc.h b/src/w32-sock-nonce.inc.h
index 260c872..4b099ff 100644
--- a/src/w32-sock-nonce.inc.h
+++ b/src/w32-sock-nonce.inc.h
@@ -37,13 +37,15 @@ typedef struct assuan_sock_nonce_s assuan_sock_nonce_t;
# ifndef AF_LOCAL
# define AF_LOCAL AF_UNIX
# endif
-# define EADDRINUSE WSAEADDRINUSE
+# ifndef EADDRINUSE
+# define EADDRINUSE WSAEADDRINUSE
+# endif
struct sockaddr_un
{
short sun_family;
unsigned short sun_port;
struct in_addr sun_addr;
- char sun_path[108-2-4];
+ char sun_path[108-2-4];
};
#endif