Browse Source

Don't define INVALID_SOCKET if it has been defined already (i.e. by libpcap) (#1021)

Co-authored-by: Thomas Behn <[email protected]>
Thomas Behn 4 years ago
parent
commit
a58f042614
1 changed files with 2 additions and 0 deletions
  1. 2 0
      httplib.h

+ 2 - 0
httplib.h

@@ -178,7 +178,9 @@ using socket_t = SOCKET;
 #include <unistd.h>
 #include <unistd.h>
 
 
 using socket_t = int;
 using socket_t = int;
+#ifndef INVALID_SOCKET
 #define INVALID_SOCKET (-1)
 #define INVALID_SOCKET (-1)
+#endif
 #endif //_WIN32
 #endif //_WIN32
 
 
 #include <algorithm>
 #include <algorithm>