From 26dae64f2241283089887e6e1d3d9e17ee782926 Mon Sep 17 00:00:00 2001 From: Brad House Date: Sun, 19 May 2024 12:57:26 -0400 Subject: [PATCH] windows build fix --- src/lib/ares_event_configchg.c | 6 +++++- src/lib/ares_ipv6.h | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/ares_event_configchg.c b/src/lib/ares_event_configchg.c index 4aa2842c09..23f4e5335e 100644 --- a/src/lib/ares_event_configchg.c +++ b/src/lib/ares_event_configchg.c @@ -204,7 +204,11 @@ ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg, (*configchg)->e = e; - if (NotifyIpInterfaceChange(AF_UNSPEC, ares_event_configchg_cb, *configchg, FALSE, &(*configchg)->ifchg_hnd) != NO_ERROR) { + if (NotifyIpInterfaceChange(AF_UNSPEC, + (PIPINTERFACE_CHANGE_CALLBACK)ares_event_configchg_cb, + *configchg, + FALSE, + &(*configchg)->ifchg_hnd) != NO_ERROR) { status = ARES_ESERVFAIL; goto done; } diff --git a/src/lib/ares_ipv6.h b/src/lib/ares_ipv6.h index 28d7851ff3..e7e0b6d3a5 100644 --- a/src/lib/ares_ipv6.h +++ b/src/lib/ares_ipv6.h @@ -31,6 +31,15 @@ # include #endif +#if defined(USE_WINSOCK) +# if defined(HAVE_IPHLPAPI_H) +# include +# endif +# if defined(HAVE_NETIOAPI_H) +# include +# endif +#endif + #ifndef HAVE_PF_INET6 # define PF_INET6 AF_INET6 #endif