]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
windows: Check for existence of error codes before defining them
authorMartin Willi <martin@revosec.ch>
Thu, 2 Jan 2014 13:34:00 +0000 (14:34 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 4 Jun 2014 13:53:05 +0000 (15:53 +0200)
src/libstrongswan/utils/windows.h

index 2de6f043b460273a5c5c169c33d58abeb4012daf..9ed6f8f11b7ee409594cbffe727b8ee5ad5f5a3b 100644 (file)
@@ -258,13 +258,17 @@ int socketpair(int domain, int type, int protocol, int sv[2]);
 /**
  * EWOULDBLOCK is EAGAIN on other systems as well
  */
+#ifndef EWOULDBLOCK
 #define EWOULDBLOCK EAGAIN
+#endif
 
 /**
  * ECONNRESET is mapped to something arbitrary. It is returned by
  * stream->read_all() but should not be mapped from a send/recv WSA error.
  */
+#ifndef ECONNRESET
 #define ECONNRESET ENXIO
+#endif
 
 /**
  * close(2) working for file handles and Winsock sockets