aboutsummaryrefslogtreecommitdiffstats
path: root/capture_wpcap_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'capture_wpcap_packet.c')
-rw-r--r--capture_wpcap_packet.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/capture_wpcap_packet.c b/capture_wpcap_packet.c
index 4b58cd37c4..e7a458d88c 100644
--- a/capture_wpcap_packet.c
+++ b/capture_wpcap_packet.c
@@ -63,13 +63,10 @@ typedef unsigned short eth_sa_family_t;
#define ETH_SS_PAD2SIZE (ETH_SS_MAXSIZE - (sizeof (eth_sa_family_t) + \
ETH_SS_PAD1SIZE + ETH_SS_ALIGNSIZE))
-/* sockaddr_storage problem with different MSVC versions
- * - MSVC 6 (1200) doesn't define this
- * - MSVC 7 (1300) does
- * - MSVC 7.1 (1310) does
- * - MSVC 8 (1400) does */
-/* we might need to tweak this #if, see version_info for _MSC_VER values */
-#if _MSC_VER < 1300
+/* sockaddr_storage seems to depend if a Platform SDK is installed,
+ (or to be more precise, if WINSOCK2 is available)
+ and not on the MSVC version installed */
+#if defined _WIN32 && !defined _WINSOCK2API_
struct sockaddr_storage {
eth_sa_family_t __ss_family; /* address family */
/* Following fields are implementation specific */
@@ -85,8 +82,8 @@ struct sockaddr_storage {
/* __ss_pad1, __ss_align fields is 112 */
};
/* ... copied from RFC2553 */
-#endif /* _MSC_VER */
-#endif
+#endif /* _WIN32 */
+#endif /* HAVE_SOCKADDR_STORAGE */
#include <Packet32.h>