Enable IPv6-support on win32 if target os is windows xp or newer (win2k lacks needed functions)

This commit is contained in:
Stefan Gehn 2010-06-12 19:26:34 +00:00
parent fca2abf848
commit 836310c392
2 changed files with 12 additions and 1 deletions

View File

@ -35,6 +35,13 @@
#include "../src/gkrellm-sysdeps.h"
#if defined(WIN32)
// Enable getaddrinfo on win32 if we target win xp or newer
#if _WIN32_WINNT > 0x0500
#define HAVE_GETADDRINFO 1
#endif
#endif
#if defined(__linux__)
#if defined(__GLIBC__) && ((__GLIBC__>2)||(__GLIBC__==2 && __GLIBC_MINOR__>=1))
#define HAVE_GETADDRINFO 1

View File

@ -37,8 +37,12 @@
#include <netdb.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
// Enable IPV6 on win32 if we target win xp or newer
#if defined(IPPROTO_IPV6) && (_WIN32_WINNT > 0x0500)
#define INET6
#endif
#endif
#if defined(__linux__)
#if defined(IPPROTO_IPV6)