forked from osmocom/wireshark
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
This commit is contained in:
parent
109388d263
commit
c7ba9e25b3
|
@ -44,10 +44,14 @@
|
|||
|
||||
|
||||
|
||||
#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;
|
||||
|
||||
/*
|
||||
|
@ -63,10 +67,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 */
|
||||
|
@ -82,8 +82,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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue