mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fix ext/sockets build on Haiku
The `SOCK_RDM` datagram option is unsupported on Haiku; instead `ifreq` has direct access to `ifr_index`. Closes GH-7849.
This commit is contained in:
parent
f1d7f95702
commit
09165ace37
2
NEWS
2
NEWS
@ -2,6 +2,8 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2022, PHP 8.0.16
|
||||
|
||||
- Sockets:
|
||||
. Fixed ext/sockets build on Haiku. (David Carlier)
|
||||
|
||||
20 Jan 2022, PHP 8.0.15
|
||||
|
||||
|
@ -718,7 +718,7 @@ int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_add
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
#if !defined(ifr_ifindex) && defined(ifr_index)
|
||||
#if !defined(ifr_ifindex) && (defined(ifr_index) || defined(__HAIKU__))
|
||||
#define ifr_ifindex ifr_index
|
||||
#endif
|
||||
|
||||
|
@ -472,7 +472,9 @@ static PHP_MINIT_FUNCTION(sockets)
|
||||
REGISTER_LONG_CONSTANT("SOCK_DGRAM", SOCK_DGRAM, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("SOCK_RAW", SOCK_RAW, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("SOCK_SEQPACKET",SOCK_SEQPACKET, CONST_CS | CONST_PERSISTENT);
|
||||
#ifdef SOCK_RDM
|
||||
REGISTER_LONG_CONSTANT("SOCK_RDM", SOCK_RDM, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
|
||||
REGISTER_LONG_CONSTANT("MSG_OOB", MSG_OOB, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MSG_WAITALL", MSG_WAITALL, CONST_CS | CONST_PERSISTENT);
|
||||
|
Loading…
Reference in New Issue
Block a user