mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
fix bad refactor of #7136
This commit is contained in:
parent
ca6f3f62f2
commit
b10bcb4faa
2 changed files with 3 additions and 4 deletions
|
@ -429,7 +429,7 @@ function getmxrr(string $hostname, &$hosts, &$weights = null): bool {}
|
||||||
|
|
||||||
/* net.c */
|
/* net.c */
|
||||||
|
|
||||||
#if defined(PHP_WIN32) || HAVE_GETIFADDRS
|
#if defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__)
|
||||||
function net_get_interfaces(): array|false {}
|
function net_get_interfaces(): array|false {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#define getifaddrs Qp2getifaddrs
|
#define getifaddrs Qp2getifaddrs
|
||||||
#define freeifaddrs Qp2freeifaddrs
|
#define freeifaddrs Qp2freeifaddrs
|
||||||
#define ifaddrs ifaddrs_pase
|
#define ifaddrs ifaddrs_pase
|
||||||
#define HAVE_GETIFADDRS
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
|
@ -103,7 +102,7 @@ PHPAPI zend_string* php_inet_ntop(const struct sockaddr *addr) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PHP_WIN32) || HAVE_GETIFADDRS
|
#if defined(PHP_WIN32) || HAVE_GETIFADDRS || defined(__PASE__)
|
||||||
static void iface_append_unicast(zval *unicast, zend_long flags,
|
static void iface_append_unicast(zval *unicast, zend_long flags,
|
||||||
struct sockaddr *addr, struct sockaddr *netmask,
|
struct sockaddr *addr, struct sockaddr *netmask,
|
||||||
struct sockaddr *broadcast, struct sockaddr *ptp) {
|
struct sockaddr *broadcast, struct sockaddr *ptp) {
|
||||||
|
@ -265,7 +264,7 @@ PHP_FUNCTION(net_get_interfaces) {
|
||||||
FREE(pAddresses);
|
FREE(pAddresses);
|
||||||
#undef MALLOC
|
#undef MALLOC
|
||||||
#undef FREE
|
#undef FREE
|
||||||
#elif HAVE_GETIFADDRS /* !PHP_WIN32 */
|
#elif HAVE_GETIFADDRS || defined(__PASE__) /* !PHP_WIN32 */
|
||||||
struct ifaddrs *addrs = NULL, *p;
|
struct ifaddrs *addrs = NULL, *p;
|
||||||
|
|
||||||
ZEND_PARSE_PARAMETERS_NONE();
|
ZEND_PARSE_PARAMETERS_NONE();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue