View | Details | Raw Unified | Return to bug 259725 | Differences between
and this patch

Collapse All | Expand All

(-)b/lang/php74/Makefile (-1 / +1 lines)
Lines 1-6 Link Here
1
PORTNAME=	php74
1
PORTNAME=	php74
2
DISTVERSION=	7.4.25
2
DISTVERSION=	7.4.25
3
PORTREVISION?=	0
3
PORTREVISION?=	1
4
CATEGORIES?=	lang devel www
4
CATEGORIES?=	lang devel www
5
MASTER_SITES=	PHP/distributions
5
MASTER_SITES=	PHP/distributions
6
DISTNAME=	php-${DISTVERSION}
6
DISTNAME=	php-${DISTVERSION}
(-)b/lang/php74/files/patch-ext_standard_dns.c (+21 lines)
Added Link Here
1
--- ext/standard/dns.c.orig	2021-10-19 15:18:17 UTC
2
+++ ext/standard/dns.c
3
@@ -808,6 +808,7 @@ PHP_FUNCTION(dns_get_record)
4
 	zend_long type_param = PHP_DNS_ANY;
5
 	zval *authns = NULL, *addtl = NULL;
6
 	int type_to_fetch;
7
+	int dns_errno;
8
 #if defined(HAVE_DNS_SEARCH)
9
 	struct sockaddr_storage from;
10
 	uint32_t fromsize = sizeof(from);
11
@@ -957,8 +958,9 @@ PHP_FUNCTION(dns_get_record)
12
 			n = php_dns_search(handle, hostname, C_IN, type_to_fetch, answer.qb2, sizeof answer);
13
 
14
 			if (n < 0) {
15
+				dns_errno = php_dns_errno(handle);
16
 				php_dns_free_handle(handle);
17
-				switch (h_errno) {
18
+				switch (dns_errno) {
19
 					case NO_DATA:
20
 					case HOST_NOT_FOUND:
21
 						continue;
(-)b/lang/php74/files/patch-ext_standard_php__dns.h (-1 / +24 lines)
Added Link Here
0
- 
1
--- ext/standard/php_dns.h.orig	2021-10-19 15:18:17 UTC
2
+++ ext/standard/php_dns.h
3
@@ -26,6 +26,7 @@
4
     	((int)dns_search(res, dname, class, type, (char *) answer, anslen, (struct sockaddr *)&from, &fromsize))
5
 #define php_dns_free_handle(res) \
6
 		dns_free(res)
7
+#define php_dns_errno(handle) h_errno
8
 
9
 #elif defined(HAVE_RES_NSEARCH)
10
 #define php_dns_search(res, dname, class, type, answer, anslen) \
11
@@ -39,11 +40,13 @@
12
 			res_nclose(res); \
13
 			php_dns_free_res(res)
14
 #endif
15
+#define php_dns_errno(handle) handle->res_h_errno
16
 
17
 #elif defined(HAVE_RES_SEARCH)
18
 #define php_dns_search(res, dname, class, type, answer, anslen) \
19
 			res_search(dname, class, type, answer, anslen)
20
 #define php_dns_free_handle(res) /* noop */
21
+#define php_dns_errno(handle) h_errno
22
 
23
 #endif
24
 

Return to bug 259725