diff options
author | David Stuart <dstuart@counterpath.com> | 2011-05-17 11:53:13 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-05-17 11:53:13 +0200 |
commit | 6518b56a5e2bc9e39d720f17fa7dd322a28dc33c (patch) | |
tree | 3a7bed56f287de887aaa110391f7116f9f87499f /ares_library_init.c | |
parent | d60f07d09461b05e6b82a6f4a853963f8102c39a (diff) | |
download | c-ares-6518b56a5e2bc9e39d720f17fa7dd322a28dc33c.tar.gz c-ares-6518b56a5e2bc9e39d720f17fa7dd322a28dc33c.tar.bz2 c-ares-6518b56a5e2bc9e39d720f17fa7dd322a28dc33c.zip |
IPv6-on-windows: find DNS servers correctly
Diffstat (limited to 'ares_library_init.c')
-rw-r--r-- | ares_library_init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ares_library_init.c b/ares_library_init.c index 1a875da..f0137a1 100644 --- a/ares_library_init.c +++ b/ares_library_init.c @@ -26,6 +26,7 @@ #ifdef USE_WINSOCK fpGetNetworkParams_t ares_fpGetNetworkParams = ZERO_NULL; fpSystemFunction036_t ares_fpSystemFunction036 = ZERO_NULL; +fpGetAdaptersAddresses_t ares_fpGetAdaptersAddresses = ZERO_NULL; #endif /* library-private global vars with source visibility restricted to this file */ @@ -56,6 +57,15 @@ static int ares_win32_init(void) return ARES_EADDRGETNETWORKPARAMS; } + ares_fpGetAdaptersAddresses = (fpGetAdaptersAddresses_t) + GetProcAddress(hnd_iphlpapi, "GetAdaptersAddresses"); + if (!ares_fpGetAdaptersAddresses) + { + /* This can happen on clients before WinXP, I don't + think it should be an error, unless we don't want to + support Windows 2000 anymore */ + } + /* * When advapi32.dll is unavailable or advapi32.dll has no SystemFunction036, * also known as RtlGenRandom, which is the case for Windows versions prior |