Skip to content

Commit a447c9a

Browse files
committed
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 1fb97b8 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1839494 13f79535-47bb-0310-9956-ffa450edef68
1 parent b6747d9 commit a447c9a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

network_io/unix/sockaddr.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
#include <net/if.h>
3030
#endif
3131

32+
#if defined(HAVE_IF_INDEXTONAME) && defined(_MSC_VER)
33+
#include <Iphlpapi.h>
34+
#pragma comment(lib, "Iphlpapi.lib")
35+
#endif
36+
3237
#define APR_WANT_STRFUNC
3338
#include "apr_want.h"
3439

0 commit comments

Comments
 (0)