aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-01-03 12:21:19 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-03 20:21:52 +0000
commit20ad0ffbaf1d49bf3da50a62c0bed93f765b9e31 (patch)
tree6159392f658aee8bf211d2db60ccabb489f56cd7
parentf727e8b387eb83b91f927c3e8944fb974e211804 (diff)
Avoid definition collisions for INVALID_SOCKET.
Newer versions of libpcap define it (due to the somewhat infelicitous API for "active mode" remote capture, which returns a socket); don't define it ourselves if it's already defined. Change-Id: I620576620fd2708ebd503da696e17b472bc20472 Reviewed-on: https://code.wireshark.org/review/31344 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--wsutil/socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/wsutil/socket.h b/wsutil/socket.h
index 5e79ac54f9..ca30d807c2 100644
--- a/wsutil/socket.h
+++ b/wsutil/socket.h
@@ -36,7 +36,9 @@
#define closesocket(socket) close(socket)
#define socket_handle_t int
+#ifndef INVALID_SOCKET
#define INVALID_SOCKET (-1)
+#endif
#define SOCKET_ERROR (-1)
#endif