diff options
author | Patrik Nyblom <[email protected]> | 2010-11-26 14:12:13 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-11-30 16:33:58 +0100 |
commit | 561617f5ce8ac04e52ebb6cac2b131850a787869 (patch) | |
tree | 1493fdf2ee51aec3227027b2d16170d7e718e1a5 /erts/emulator/drivers/common/inet_drv.c | |
parent | fed20c731b91f1debb11a809cc5999d8b04dd293 (diff) | |
download | otp-561617f5ce8ac04e52ebb6cac2b131850a787869.tar.gz otp-561617f5ce8ac04e52ebb6cac2b131850a787869.tar.bz2 otp-561617f5ce8ac04e52ebb6cac2b131850a787869.zip |
Adapt inet_drv to Visual Studio 2008
Diffstat (limited to 'erts/emulator/drivers/common/inet_drv.c')
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index 18f7cdd15a..6f56cab575 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -88,9 +88,21 @@ #include <winsock2.h> #endif #include <windows.h> +#include <Ws2tcpip.h> /* NEED VC 6.0 or higher */ + +/* Visual studio 2008+: NTDDI_VERSION needs to be set for iphlpapi.h + to define the right structures. It needs to be set to WINXP (or LONGHORN) + for IPV6 to work and it's set lower by default, so we need to change it. */ +#ifdef HAVE_SDKDDKVER_H +# include <sdkddkver.h> +# ifdef NTDDI_VERSION +# undef NTDDI_VERSION +# endif +# define NTDDI_VERSION NTDDI_WINXP +#endif + #include <iphlpapi.h> -#include <Ws2tcpip.h> /* NEED VC 6.0 !!! */ #undef WANT_NONBLOCKING #include "sys.h" |