Skip to content

Commit e1a2383

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: Fix ext/sockets build on Haiku
2 parents d7027a6 + 623b212 commit e1a2383

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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)