Skip to content

Commit 623b212

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix ext/sockets build on Haiku
2 parents 15466ed + 09165ac commit 623b212

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ PHP NEWS
5656

5757
- Sockets:
5858
. Avoid void* arithmetic in sockets/multicast.c on NetBSD. (David Carlier)
59+
. Fixed ext/sockets build on Haiku. (David Carlier)
5960

6061
- Spl:
6162
. Fixed bug #75917 (SplFileObject::seek broken with CSV flags). (Aliaksandr

ext/sockets/multicast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_add
718718
return SUCCESS;
719719
}
720720

721-
#if !defined(ifr_ifindex) && defined(ifr_index)
721+
#if !defined(ifr_ifindex) && (defined(ifr_index) || defined(__HAIKU__))
722722
#define ifr_ifindex ifr_index
723723
#endif
724724

ext/sockets/sockets.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,9 @@ static PHP_MINIT_FUNCTION(sockets)
463463
REGISTER_LONG_CONSTANT("SOCK_DGRAM", SOCK_DGRAM, CONST_CS | CONST_PERSISTENT);
464464
REGISTER_LONG_CONSTANT("SOCK_RAW", SOCK_RAW, CONST_CS | CONST_PERSISTENT);
465465
REGISTER_LONG_CONSTANT("SOCK_SEQPACKET",SOCK_SEQPACKET, CONST_CS | CONST_PERSISTENT);
466+
#ifdef SOCK_RDM
466467
REGISTER_LONG_CONSTANT("SOCK_RDM", SOCK_RDM, CONST_CS | CONST_PERSISTENT);
468+
#endif
467469

468470
REGISTER_LONG_CONSTANT("MSG_OOB", MSG_OOB, CONST_CS | CONST_PERSISTENT);
469471
REGISTER_LONG_CONSTANT("MSG_WAITALL", MSG_WAITALL, CONST_CS | CONST_PERSISTENT);

0 commit comments

Comments
 (0)