diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2007-03-24 02:45:45 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2007-03-24 02:45:45 +0000 |
commit | 473f4c3b6455da57f7ca74cfbf3f262a8ab98de3 (patch) | |
tree | 22e563b81d5e6bcbf709d5fcae6dd7b77399f7fb /gtk/capture_if_details_dlg.c | |
parent | dfc2b16e29873c54c6bf7623bac02c2e2571e827 (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 'gtk/capture_if_details_dlg.c')
-rw-r--r-- | gtk/capture_if_details_dlg.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gtk/capture_if_details_dlg.c b/gtk/capture_if_details_dlg.c index 59c0dd7e7c..8f1ea3884b 100644 --- a/gtk/capture_if_details_dlg.c +++ b/gtk/capture_if_details_dlg.c @@ -71,13 +71,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 */ @@ -93,8 +90,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> |