diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2018-08-28 18:58:34 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2018-08-28 18:58:34 +0000 |
commit | 7640236baffeb6ce097fc38597d4eb66b3933e87 (patch) | |
tree | ee6e58cefa7836949f13f33ad6f14fac91204c19 | |
parent | 1277df6ce0824ee9f2d7b1c048fd9f792e0c9066 (diff) | |
download | libapr-7640236baffeb6ce097fc38597d4eb66b3933e87.tar.gz |
Fix breakage on _WIN32_WINNT>=0x0600 due to if_indextoname,
it is wrapped in a very odd way on Windows, both the includes
and required libraries. Using a pragma to create a link time
resolution for the required lib is simplest.
Submitted by: jeking3
https://github.com/apache/apr/pull/7/commits/1fb97b8bd0b02fe71945b03986f3c69fb4270b6b
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1839493 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | network_io/unix/sockaddr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/network_io/unix/sockaddr.c b/network_io/unix/sockaddr.c index 8e4bde3e3..94b00983b 100644 --- a/network_io/unix/sockaddr.c +++ b/network_io/unix/sockaddr.c @@ -29,6 +29,11 @@ #include <net/if.h> #endif +#if defined(HAVE_IF_INDEXTONAME) && defined(_MSC_VER) +#include <Iphlpapi.h> +#pragma comment(lib, "Iphlpapi.lib") +#endif + #define APR_WANT_STRFUNC #include "apr_want.h" |