Skip to content

Commit 9672cd9

Browse files
committed
ext/sockets: Adding macOS SO_LINGER_SEC constant.
macOS SO_LINGER, unlike other platforms, functions in term of ticks, SO_LINGER_SEC is provided to be in line with other platforms. close phpGH-14599
1 parent c588db1 commit 9672cd9

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ PHP NEWS
257257
(David Carlier)
258258
. Added the SO_NOSIGPIPE constant to control the generation of SIGPIPE for
259259
macOs and FreeBSD. (David Carlier)
260+
. Added SO_LINGER_SEC for macOs, true equivalent of SO_LINGER in other platforms.
261+
(David Carlier)
260262

261263
- SNMP:
262264
. Removed the deprecated inet_ntoa call support. (David Carlier)

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ PHP 8.4 UPGRADE NOTES
742742
. TCP_SYNCNT (Linux only).
743743
. SO_EXCLBIND (Solaris/Illumos only).
744744
. SO_NOSIGPIPE (macOs and FreeBSD).
745+
. SO_LINGER_SEC (macOs only).
745746

746747
- Sodium:
747748
. SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES

ext/sockets/sockets.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,13 @@
208208
* @cvalue SO_LINGER
209209
*/
210210
const SO_LINGER = UNKNOWN;
211+
#ifdef SO_LINGER_SEC
212+
/**
213+
* @var int
214+
* @cvalue SO_LINGER_SEC
215+
*/
216+
const SO_LINGER_SEC = UNKNOWN;
217+
#endif
211218
/**
212219
* @var int
213220
* @cvalue SO_BROADCAST

ext/sockets/sockets_arginfo.h

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)