aboutsummaryrefslogtreecommitdiffstats
path: root/capture_wpcap_packet.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2007-03-24 02:45:45 +0000
committerUlf Lamping <ulf.lamping@web.de>2007-03-24 02:45:45 +0000
commit473f4c3b6455da57f7ca74cfbf3f262a8ab98de3 (patch)
tree22e563b81d5e6bcbf709d5fcae6dd7b77399f7fb /capture_wpcap_packet.c
parentdfc2b16e29873c54c6bf7623bac02c2e2571e827 (diff)
as mentioned by Graham Bloice:
sockaddr_storage doesn't depend on the MSVC version used, but the version of the Winsock API, which might be updated by the Platform SDK even on MSVC 6 - so depending on the _MSC_VER is not the way to go svn path=/trunk/; revision=21162
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>