Skip to content

Commit 76d8752

Browse files
author
Scott MacVicar
committed
Part fix for bug #49224
1 parent 5af006d commit 76d8752

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ PHP NEWS
4040
cannot be set"). (Felipe)
4141
- Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
4242
fclose). (Ilia)
43+
- Fixed bug #49224 (Compile error due to old DNS functions on AIX systems).
44+
(Scott)
4345
- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
4446
- Fixed PECL bug #16842 (oci_error return false when NO_DATA_FOUND is raised).
4547
(Chris Jones)

ext/standard/dns.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -810,14 +810,8 @@ PHP_FUNCTION(dns_get_record)
810810
n = php_dns_search(handle, hostname, C_IN, type_to_fetch, answer.qb2, sizeof answer);
811811

812812
if (n < 0) {
813-
if (php_dns_errno(handle) == NO_DATA) {
814-
php_dns_free_handle(handle);
815-
continue;
816-
}
817-
818813
php_dns_free_handle(handle);
819-
zval_dtor(return_value);
820-
RETURN_FALSE;
814+
continue;
821815
}
822816

823817
cp = answer.qb2 + HFIXEDSZ;

ext/standard/php_dns.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,18 @@
2828
((int)dns_search(res, dname, class, type, answer, anslen, (struct sockaddr *)&from, &fromsize))
2929
#define php_dns_free_handle(res) \
3030
dns_free(res)
31-
#define php_dns_errno(_res) \
32-
(NO_DATA)
3331

3432
#elif defined(HAVE_RES_NSEARCH)
3533
#define php_dns_search(res, dname, class, type, answer, anslen) \
3634
res_nsearch(res, dname, class, type, answer, anslen);
3735
#define php_dns_free_handle(res) \
3836
res_nclose(res); \
3937
php_dns_free_res(*res)
40-
#define php_dns_errno(res) \
41-
(res->res_h_errno)
4238

4339
#elif defined(HAVE_RES_SEARCH)
4440
#define php_dns_search(res, dname, class, type, answer, anslen) \
4541
res_search(dname, class, type, answer, anslen)
4642
#define php_dns_free_handle(res) /* noop */
47-
#define php_dns_errno(res) \
48-
(_res.res_h_errno)
4943

5044
#endif
5145

0 commit comments

Comments
 (0)