summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/dns.c8
-rw-r--r--ext/standard/php_dns.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 604e390ea3..ad085376b1 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -323,12 +323,12 @@ typedef union {
#if defined(__GLIBC__) && !defined(HAVE_DEPRECATED_DNS_FUNCS)
#define php_dns_free_res(__res__) _php_dns_free_res(__res__)
-static void _php_dns_free_res(struct __res_state res) { /* {{{ */
+static void _php_dns_free_res(struct __res_state *res) { /* {{{ */
int ns;
for (ns = 0; ns < MAXNS; ns++) {
- if (res._u._ext.nsaddrs[ns] != NULL) {
- free (res._u._ext.nsaddrs[ns]);
- res._u._ext.nsaddrs[ns] = NULL;
+ if (res->_u._ext.nsaddrs[ns] != NULL) {
+ free (res->_u._ext.nsaddrs[ns]);
+ res->_u._ext.nsaddrs[ns] = NULL;
}
}
} /* }}} */
diff --git a/ext/standard/php_dns.h b/ext/standard/php_dns.h
index f37bce539a..af6c091881 100644
--- a/ext/standard/php_dns.h
+++ b/ext/standard/php_dns.h
@@ -34,7 +34,7 @@
res_nsearch(res, dname, class, type, answer, anslen);
#define php_dns_free_handle(res) \
res_nclose(res); \
- php_dns_free_res(*res)
+ php_dns_free_res(res)
#elif defined(HAVE_RES_SEARCH)
#define php_dns_search(res, dname, class, type, answer, anslen) \