Skip to content

Commit b10bcb4

Browse files
committed
fix bad refactor of #7136
1 parent ca6f3f6 commit b10bcb4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/standard/basic_functions.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ function getmxrr(string $hostname, &$hosts, &$weights = null): bool {}
429429

430430
/* net.c */
431431

432-
#if defined(PHP_WIN32) || HAVE_GETIFADDRS
432+
#if defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__)
433433
function net_get_interfaces(): array|false {}
434434
#endif
435435

ext/standard/net.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#define getifaddrs Qp2getifaddrs
3434
#define freeifaddrs Qp2freeifaddrs
3535
#define ifaddrs ifaddrs_pase
36-
#define HAVE_GETIFADDRS
3736
#endif
3837

3938
#ifdef PHP_WIN32
@@ -103,7 +102,7 @@ PHPAPI zend_string* php_inet_ntop(const struct sockaddr *addr) {
103102
return NULL;
104103
}
105104

106-
#if defined(PHP_WIN32) || HAVE_GETIFADDRS
105+
#if defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__)
107106
static void iface_append_unicast(zval *unicast, zend_long flags,
108107
struct sockaddr *addr, struct sockaddr *netmask,
109108
struct sockaddr *broadcast, struct sockaddr *ptp) {
@@ -265,7 +264,7 @@ PHP_FUNCTION(net_get_interfaces) {
265264
FREE(pAddresses);
266265
#undef MALLOC
267266
#undef FREE
268-
#elif HAVE_GETIFADDRS /* !PHP_WIN32 */
267+
#elif HAVE_GETIFADDRS || defined(__PASE__) /* !PHP_WIN32 */
269268
struct ifaddrs *addrs = NULL, *p;
270269

271270
ZEND_PARSE_PARAMETERS_NONE();

0 commit comments

Comments
 (0)