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 | |
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')
-rw-r--r-- | erts/configure.in | 2 | ||||
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/erts/configure.in b/erts/configure.in index 8d629c25ae..762a86ef6f 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -1479,7 +1479,7 @@ AC_CHECK_HEADERS(fcntl.h limits.h unistd.h syslog.h dlfcn.h ieeefp.h \ sys/ioctl.h sys/time.h sys/uio.h \ sys/socket.h sys/sockio.h sys/socketio.h \ net/errno.h malloc.h mach-o/dyld.h arpa/nameser.h \ - pty.h util.h utmp.h langinfo.h poll.h) + pty.h util.h utmp.h langinfo.h poll.h sdkddkver.h) AC_CHECK_HEADER(sys/resource.h, [AC_DEFINE(HAVE_SYS_RESOURCE_H, 1, 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" |