diff --git a/NEWS b/NEWS index 292a447e19a..7de5e57db15 100644 --- a/NEWS +++ b/NEWS @@ -257,6 +257,8 @@ PHP NEWS (David Carlier) . Added the SO_NOSIGPIPE constant to control the generation of SIGPIPE for macOs and FreeBSD. (David Carlier) + . Added SO_LINGER_SEC for macOs, true equivalent of SO_LINGER in other platforms. + (David Carlier) - SNMP: . Removed the deprecated inet_ntoa call support. (David Carlier) diff --git a/UPGRADING b/UPGRADING index 791f51bf7a0..275eb716de1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -742,6 +742,7 @@ PHP 8.4 UPGRADE NOTES . TCP_SYNCNT (Linux only). . SO_EXCLBIND (Solaris/Illumos only). . SO_NOSIGPIPE (macOs and FreeBSD). + . SO_LINGER_SEC (macOs only). - Sodium: . SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index 3de9b6a899c..aa44c0bcf5f 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -208,6 +208,13 @@ const SO_DONTROUTE = UNKNOWN; * @cvalue SO_LINGER */ const SO_LINGER = UNKNOWN; +#ifdef SO_LINGER_SEC +/** + * @var int + * @cvalue SO_LINGER_SEC + */ +const SO_LINGER_SEC = UNKNOWN; +#endif /** * @var int * @cvalue SO_BROADCAST diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index f72cf038e7a..88b9232f2c2 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 49b34a1e2f25000d71fb5bf6722db31607ded646 */ + * Stub hash: 3a3ee52b0773e96ead463517e6d9a68c2b385b92 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -400,6 +400,9 @@ static void register_sockets_symbols(int module_number) REGISTER_LONG_CONSTANT("SO_KEEPALIVE", SO_KEEPALIVE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_DONTROUTE", SO_DONTROUTE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_LINGER", SO_LINGER, CONST_PERSISTENT); +#if defined(SO_LINGER_SEC) + REGISTER_LONG_CONSTANT("SO_LINGER_SEC", SO_LINGER_SEC, CONST_PERSISTENT); +#endif REGISTER_LONG_CONSTANT("SO_BROADCAST", SO_BROADCAST, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_OOBINLINE", SO_OOBINLINE, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_SNDBUF", SO_SNDBUF, CONST_PERSISTENT);