aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_if_details_dlg.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2007-03-24 18:26:34 +0000
committerUlf Lamping <ulf.lamping@web.de>2007-03-24 18:26:34 +0000
commitc7ba9e25b30fc86fc996412ae988bf7d4c47a7ba (patch)
tree11022f7153066a8fffcecd941425b9db566427d9 /gtk/capture_if_details_dlg.c
parent109388d263a0055676bd1f2f2ddfdd6525f84b49 (diff)
hmmm, _WINSOCK2API_ is not the way to go, the PSDK that comes with MSVC 6.0 also defines this - but not sockaddr_storage :-(
Next try is to use the WINVER #define. AFAIK, this depends on the Platform SDK version used, which is actually our problem here. So this fix *might* work ... svn path=/trunk/; revision=21168
Diffstat (limited to 'gtk/capture_if_details_dlg.c')
-rw-r--r--gtk/capture_if_details_dlg.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk/capture_if_details_dlg.c b/gtk/capture_if_details_dlg.c
index 8f1ea3884b..99714c300c 100644
--- a/gtk/capture_if_details_dlg.c
+++ b/gtk/capture_if_details_dlg.c
@@ -52,10 +52,14 @@
#include "gtkvumeter.h"
#endif
-#ifndef HAVE_SOCKADDR_STORAGE
-/* packet32.h requires sockaddr_storage (usually defined in Platform SDK)
+/* packet32.h requires sockaddr_storage
+ * wether sockaddr_storage is defined or not depends on the Platform SDK
+ * version installed. The only one not defining it is the SDK that comes
+ * with MSVC 6.0 (WINVER 0x0400).
+ *
* copied from RFC2553 (and slightly modified because of datatypes) ...
* XXX - defined more than once, move this to a header file */
+#if (WINVER <= 0x0400)
typedef unsigned short eth_sa_family_t;
/*
@@ -71,10 +75,6 @@ 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 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 */
@@ -90,9 +90,7 @@ struct sockaddr_storage {
/* __ss_pad1, __ss_align fields is 112 */
};
/* ... copied from RFC2553 */
-#endif /* _WIN32 */
-#endif /* HAVE_SOCKADDR_STORAGE */
-
+#endif /* WINVER */
#include <Packet32.h>
#include <windows.h>