From 32f368640d43512bb99e1b0e6e8d57080ad90f49 Mon Sep 17 00:00:00 2001 From: Apple Date: Tue, 6 Oct 2009 22:11:25 +0000 Subject: [PATCH] libresolv-40.tar.gz --- Makefile | 12 ++++++------ dns_async.c | 2 +- dns_plugin.c | 31 +++++++++++++++---------------- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 1f10d4f..768c5b7 100644 --- a/Makefile +++ b/Makefile @@ -30,20 +30,20 @@ endif include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make -build:: dns.so - PLUGIN_LD_Flags = -L$(SYMROOT) -lresolv.9 PLUGIN_CC_Flags = -bundle PLUGIN_DEST = $(DSTROOT)/$(DESTDIR)usr/lib/info +build:: dns.so + dns.so: dns_plugin.c - cc -c $(CFLAGS) dns_plugin.c - cc $(PLUGIN_CC_Flags) $(LDFLAGS) $(PLUGIN_LD_Flags) -o $(SYMROOT)/dns.so dns_plugin.o - dsymutil --out=$(SYMROOT)/dns.so.dSYM $(SYMROOT)/dns.so || exit 0 + $(CC) -c $(CFLAGS) dns_plugin.c + $(CC) $(PLUGIN_CC_Flags) $(LDFLAGS) $(PLUGIN_LD_Flags) -o $(SYMROOT)/dns.so dns_plugin.o + $(DSYMUTIL) --out=$(SYMROOT)/dns.so.dSYM $(SYMROOT)/dns.so || exit 0 $(INSTALL_DIRECTORY) $(PLUGIN_DEST) $(INSTALL_LIBRARY) $(SYMROOT)/dns.so $(PLUGIN_DEST) - strip -S $(PLUGIN_DEST)/dns.so + $(STRIP) -S $(PLUGIN_DEST)/dns.so after_install: $(INSTALL_DIRECTORY) $(DSTROOT)/usr/include/arpa diff --git a/dns_async.c b/dns_async.c index 66bff8b..0589249 100644 --- a/dns_async.c +++ b/dns_async.c @@ -147,7 +147,7 @@ dns_async_start(mach_port_t *p, const char *name, uint16_t dnsclass, uint16_t dn c = dnsclass; t = dnstype; - *p = si_async_call(dns, call, name, NULL, c, t, 0, 0, (void *)_dns_callback, (void *)my_ctx); + *p = si_async_call(dns, call, name, NULL, NULL, c, t, 0, 0, (void *)_dns_callback, (void *)my_ctx); if (*p == MACH_PORT_NULL) { free(my_ctx); diff --git a/dns_plugin.c b/dns_plugin.c index 58d8de6..8b17275 100644 --- a/dns_plugin.c +++ b/dns_plugin.c @@ -442,7 +442,7 @@ dns_reply_to_hostent(dns_reply_t *r, int af, const char *addr, dns_build_hostent } static si_item_t * -_internal_host_byname(si_mod_t *si, const char *name, int af, uint32_t *err, int which) +_internal_host_byname(si_mod_t *si, const char *name, int af, const char *ignored, uint32_t *err, int which) { uint32_t type; dns_reply_t *r; @@ -520,19 +520,19 @@ _internal_host_byname(si_mod_t *si, const char *name, int af, uint32_t *err, int } si_item_t * -dns_host_byname(si_mod_t *si, const char *name, int af, uint32_t *err) +dns_host_byname(si_mod_t *si, const char *name, int af, const char *ignored, uint32_t *err) { - return _internal_host_byname(si, name, af, err, MODULE_DNS); + return _internal_host_byname(si, name, af, NULL, err, MODULE_DNS); } si_item_t * -mdns_host_byname(si_mod_t *si, const char *name, int af, uint32_t *err) +mdns_host_byname(si_mod_t *si, const char *name, int af, const char *ignored, uint32_t *err) { - return _internal_host_byname(si, name, af, err, MODULE_MDNS); + return _internal_host_byname(si, name, af, NULL, err, MODULE_MDNS); } static si_item_t * -_internal_host_byaddr(si_mod_t *si, const void *addr, int af, uint32_t *err, int which) +_internal_host_byaddr(si_mod_t *si, const void *addr, int af, const char *ignored, uint32_t *err, int which) { uint32_t type; dns_reply_t *r; @@ -629,22 +629,22 @@ _internal_host_byaddr(si_mod_t *si, const void *addr, int af, uint32_t *err, int } si_item_t * -dns_host_byaddr(si_mod_t *si, const void *addr, int af, uint32_t *err) +dns_host_byaddr(si_mod_t *si, const void *addr, int af, const char *ignored, uint32_t *err) { - return _internal_host_byaddr(si, addr, af, err, MODULE_DNS); + return _internal_host_byaddr(si, addr, af, NULL, err, MODULE_DNS); } si_item_t * -mdns_host_byaddr(si_mod_t *si, const void *addr, int af, uint32_t *err) +mdns_host_byaddr(si_mod_t *si, const void *addr, int af, const char *ignored, uint32_t *err) { - return _internal_host_byaddr(si, addr, af, err, MODULE_MDNS); + return _internal_host_byaddr(si, addr, af, NULL, err, MODULE_MDNS); } /* * We support dns_async_start / cancel / handle_reply using dns_item_call */ static si_item_t * -_internal_item_call(si_mod_t *si, int call, const char *name, const char *ignored, uint32_t class, uint32_t type, uint32_t *err, int which) +_internal_item_call(si_mod_t *si, int call, const char *name, const char *ignored1, const char *ignored2, uint32_t class, uint32_t type, uint32_t *err, int which) { dns_handle_t dns; char buf[DNS_MAX_RECEIVE_SIZE]; @@ -699,15 +699,15 @@ _internal_item_call(si_mod_t *si, int call, const char *name, const char *ignore } si_item_t * -dns_item_call(si_mod_t *si, int call, const char *name, const char *ignored, uint32_t class, uint32_t type, uint32_t *err) +dns_item_call(si_mod_t *si, int call, const char *name, const char *ignored1, const char *ignored2, uint32_t class, uint32_t type, uint32_t *err) { - return _internal_item_call(si, call, name, ignored, class, type, err, MODULE_DNS); + return _internal_item_call(si, call, name, ignored1, ignored2, class, type, err, MODULE_DNS); } si_item_t * -mdns_item_call(si_mod_t *si, int call, const char *name, const char *ignored, uint32_t class, uint32_t type, uint32_t *err) +mdns_item_call(si_mod_t *si, int call, const char *name, const char *ignored1, const char *ignored2, uint32_t class, uint32_t type, uint32_t *err) { - return _internal_item_call(si, call, name, ignored, class, type, err, MODULE_MDNS); + return _internal_item_call(si, call, name, ignored1, ignored2, class, type, err, MODULE_MDNS); } int @@ -788,4 +788,3 @@ mdns_init(si_mod_t *si) return 0; } - -- 2.45.2