This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH v2] Use DnsFree instead of deprecated DnsRecordListFree
- From: Peter Foley <pefoley2 at pefoley dot com>
- To: cygwin-patches at cygwin dot com
- Cc: Peter Foley <pefoley2 at pefoley dot com>
- Date: Mon, 21 Mar 2016 16:41:25 -0400
- Subject: [PATCH v2] Use DnsFree instead of deprecated DnsRecordListFree
- Authentication-results: sourceware.org; auth=none
- References: <1458580546-14484-1-git-send-email-pefoley2 at pefoley dot com> <1458580546-14484-2-git-send-email-pefoley2 at pefoley dot com> <20160321192450 dot GD14892 at calimero dot vinschen dot de> <CAOFdcFP=cJyuiB=dPEqa2XpFV5jmVoepwr0CQ1=2R0j9bA-CHA at mail dot gmail dot com> <20160321195244 dot GJ14892 at calimero dot vinschen dot de> <CAOFdcFMbLNOXCNcMYexqqUWa5GS4CyiSgrcjPHuUr7dnnR_ifg at mail dot gmail dot com> <20160321203437 dot GN14892 at calimero dot vinschen dot de>
The latest version of the mingw headers have been updated to make
DnsRecordListFree an alias of DnsFree when targeting Windows XP or later.
Use DnsFree directly, avoiding the wrapper function.
/home/peter/cross/src/cygwin/winsup/cygwin/libc/minires-os-if.c:289:
undefined reference to `DnsFree'
winsup/cygwin/ChangeLog
autoload.cc: Load DnsFree rather then DnsRecordListFree
libc/minires-os-if.cc (cygwin_query): Use DnsFree rather then DnsRecordListFree
Signed-off-by: Peter Foley <pefoley2@pefoley.com>
---
winsup/cygwin/autoload.cc | 2 +-
winsup/cygwin/libc/minires-os-if.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index 422e2c98..9e6184f 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -583,7 +583,7 @@ LoadDLLfunc (AuthzInitializeContextFromToken, 32, authz)
LoadDLLfunc (AuthzInitializeResourceManager, 24, authz)
LoadDLLfunc (DnsQuery_A, 24, dnsapi)
-LoadDLLfunc (DnsRecordListFree, 8, dnsapi)
+LoadDLLfunc (DnsFree, 8, dnsapi)
LoadDLLfunc (GetAdaptersAddresses, 20, iphlpapi)
LoadDLLfunc (GetIfEntry, 4, iphlpapi)
diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c
index 8970e1a..5142e30 100644
--- a/winsup/cygwin/libc/minires-os-if.c
+++ b/winsup/cygwin/libc/minires-os-if.c
@@ -286,7 +286,7 @@ static int cygwin_query(res_state statp, const char * DomName, int Class, int Ty
rr = rr->pNext;
}
- DnsRecordListFree(pQueryResultsSet, DnsFreeRecordList);
+ DnsFree(pQueryResultsSet, DnsFreeRecordList);
len = ptr - AnsPtr;
done:
--
2.7.4