File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -788,6 +788,9 @@ PHP_MINIT_FUNCTION(sockets)
788
788
#endif
789
789
REGISTER_LONG_CONSTANT ("SO_DEBUG" , SO_DEBUG , CONST_CS | CONST_PERSISTENT );
790
790
REGISTER_LONG_CONSTANT ("SO_REUSEADDR" , SO_REUSEADDR , CONST_CS | CONST_PERSISTENT );
791
+ #ifdef SO_REUSEPORT
792
+ REGISTER_LONG_CONSTANT ("SO_REUSEPORT" , SO_REUSEPORT , CONST_CS | CONST_PERSISTENT );
793
+ #endif
791
794
REGISTER_LONG_CONSTANT ("SO_KEEPALIVE" , SO_KEEPALIVE , CONST_CS | CONST_PERSISTENT );
792
795
REGISTER_LONG_CONSTANT ("SO_DONTROUTE" , SO_DONTROUTE , CONST_CS | CONST_PERSISTENT );
793
796
REGISTER_LONG_CONSTANT ("SO_LINGER" , SO_LINGER , CONST_CS | CONST_PERSISTENT );
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #49341: add SO_REUSEPORT support for socket_set_option()
3
+ --SKIPIF--
4
+ <?php
5
+ if (!extension_loaded ('sockets ' )) {
6
+ die ('skip sockets extension not available. ' );
7
+ }
8
+ if (PHP_OS !== 'Darwin ' && false === strpos (PHP_OS , 'BSD ' )) {
9
+ die ('is not *BSD. ' );
10
+ }
11
+ --FILE --
12
+ <?php
13
+ var_dump (defined ('SO_REUSEPORT ' ));
14
+ --EXPECTF --
15
+ bool (true )
You can’t perform that action at this time.
0 commit comments