diff options
author | Steve Holme <steve_holme@hotmail.com> | 2019-05-28 22:07:33 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2019-05-29 07:19:20 +0100 |
commit | 09eef8af18c7cc1a20f132843880f60f692d76c8 (patch) | |
tree | d62fe94b2986af1108ca71329c73238a3f092d4b /lib/system_win32.h | |
parent | 5908009e318d070e5ba6765e47a96c61b100c273 (diff) | |
download | curl-09eef8af18c7cc1a20f132843880f60f692d76c8.tar.gz |
url: Load if_nametoindex() dynamically from iphlpapi.dll on Windows
This fixes the static dependency on iphlpapi.lib and allows curl to
build for targets prior to Windows Vista.
This partially reverts 170bd047.
Fixes #3960
Closes #3958
Diffstat (limited to 'lib/system_win32.h')
-rw-r--r-- | lib/system_win32.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/system_win32.h b/lib/system_win32.h index 926328a9a..95f4af8a7 100644 --- a/lib/system_win32.h +++ b/lib/system_win32.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2016, Steve Holme, <steve_holme@hotmail.com>. + * Copyright (C) 2016 - 2019, Steve Holme, <steve_holme@hotmail.com>. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -48,20 +48,21 @@ typedef enum { PLATFORM_WINNT } PlatformIdentifier; +/* We use our own typedef here since some headers might lack this */ +typedef unsigned int(WINAPI *IF_NAMETOINDEX_FN)(char *); + +/* This is used instread of if_nametoindex if available on Windows */ +IF_NAMETOINDEX_FN Curl_if_nametoindex; + /* This is used to verify if we are running on a specific windows version */ bool Curl_verify_windows_version(const unsigned int majorVersion, const unsigned int minorVersion, const PlatformIdentifier platform, const VersionCondition condition); -#if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \ - defined(USE_WINSOCK)) - /* This is used to dynamically load DLLs */ HMODULE Curl_load_library(LPCTSTR filename); -#endif /* USE_WINDOWS_SSPI || (!CURL_DISABLE_TELNET && USE_WINSOCK) */ - #endif /* WIN32 */ #endif /* HEADER_CURL_SYSTEM_WIN32_H */ |