Skip to content

Commit 082d98b

Browse files
committed
curl.sh: add iphlpapi lib for c-ares [ci skip]
Should probably be done from `CMake/FindCares.cmake` in curl. Fixes (in win-llvm): ``` ld.lld-19: error: undefined symbol: if_indextoname >>> referenced by libcares.a(ares_getnameinfo.c.obj):(append_scopeid) ld.lld-19: error: undefined symbol: GetUnicastIpAddressTable >>> referenced by libcares.a(ares_addrinfo_localhost.c.obj):(ares_addrinfo_localhost) ld.lld-19: error: undefined symbol: FreeMibTable >>> referenced by libcares.a(ares_addrinfo_localhost.c.obj):(ares_addrinfo_localhost) ld.lld-19: error: undefined symbol: CancelMibChangeNotify2 >>> referenced by libcares.a(ares_event_configchg.c.obj):(ares_event_configchg_destroy) ld.lld-19: error: undefined symbol: NotifyIpInterfaceChange >>> referenced by libcares.a(ares_event_configchg.c.obj):(ares_event_configchg_init) ld.lld-19: error: undefined symbol: GetAdaptersAddresses >>> referenced by libcares.a(ares_sysconfig_win.c.obj):(ares_init_sysconfig_windows) ld.lld-19: error: undefined symbol: GetBestRoute2 >>> referenced by libcares.a(ares_sysconfig_win.c.obj):(ares_init_sysconfig_windows) clang-19: error: linker command failed with exit code 1 (use -v to see invocation) ``` https://github.com/curl/curl-for-win/actions/runs/12969434245/job/36173450959#step:3:7385
1 parent 9a95b2e commit 082d98b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

curl.sh

+3
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ _VER="$1"
307307
options+=" -DCARES_INCLUDE_DIR=${_TOP}/cares/${_PP}/include"
308308
options+=" -DCARES_LIBRARY=${_TOP}/cares/${_PP}/lib/libcares.a"
309309
CPPFLAGS+=' -DCARES_STATICLIB'
310+
if [ "${_OS}" = 'win' ]; then
311+
LIBS+=' -liphlpapi'
312+
fi
310313
fi
311314
if [ "${_OS}" = 'mac' ]; then
312315
# GSS API deprecated in 2012-2013 (OS X 10.8 Mountain Lion / 10.9 Mavericks, iOS 7.0)

0 commit comments

Comments
 (0)