aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-04-11 12:53:35 -0700
committerGuy Harris <guy@alum.mit.edu>2015-04-11 19:54:20 +0000
commitee309553eb05e89f136d6c5eb6774ecc6a7ebf9a (patch)
treefd862c72facb5802091d3ee5b3da54c612749f02 /extcap
parent9fecad775ccb2c766fe9d6b19eb82ac7415361c9 (diff)
It's not "Windows vs. (Linux or OS X or Cygwin)", it's "Windows vs. UN*X".
Either it's Windows and not Cygwin (__WIN32 suffices for both 32-bit and 64-bit Windows, and this code is unlikely to work on 16-bit Windows, not that much of anybody cares about it any more), or it's UN*X or Windows- pretending-to-be-UN*X-with-Cygwin. That way we don't have to pile on new defined(XXX)'s for every UN*X out there. Change-Id: Ia1df3378a88f2cf8bd1cc8f1a74b51adfe668370 Reviewed-on: https://code.wireshark.org/review/8016 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'extcap')
-rw-r--r--extcap/androiddump.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c
index f5cb7bba09..5317c54a87 100644
--- a/extcap/androiddump.c
+++ b/extcap/androiddump.c
@@ -48,7 +48,7 @@
#include "wsutil/wsgetopt.h"
#endif
-#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64))
+#if defined(__WIN32) && !defined(__CYGWIN__)
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
@@ -58,8 +58,10 @@
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
-#endif
-#if (defined(__linux__) || defined(__APPLE__) || defined(__CYGWIN__))
+#else
+ /*
+ * UN*X, or Windows pretending to be UN*X with the aid of Cygwin.
+ */
#include <arpa/inet.h>
#define closesocket(socket) close(socket)