diff options
Diffstat (limited to 'ext/sockets')
| -rw-r--r-- | ext/sockets/multicast.c | 2 | ||||
| -rw-r--r-- | ext/sockets/multicast.h | 2 | ||||
| -rw-r--r-- | ext/sockets/php_sockets.h | 2 | ||||
| -rw-r--r-- | ext/sockets/sockets.c | 5 | ||||
| -rw-r--r-- | ext/sockets/tests/bug49341.phpt | 15 | ||||
| -rw-r--r-- | ext/sockets/unix_socket_constants.h | 2 | ||||
| -rw-r--r-- | ext/sockets/win32_socket_constants.h | 2 |
7 files changed, 24 insertions, 6 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 670d29f7a..43b6f7ddd 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/sockets/multicast.h b/ext/sockets/multicast.h index 5619c9c7f..f46a6a8f6 100644 --- a/ext/sockets/multicast.h +++ b/ext/sockets/multicast.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index 38a68879b..df205e511 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 0d1714257..43bae9f66 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -788,6 +788,9 @@ PHP_MINIT_FUNCTION(sockets) #endif REGISTER_LONG_CONSTANT("SO_DEBUG", SO_DEBUG, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_REUSEADDR", SO_REUSEADDR, CONST_CS | CONST_PERSISTENT); +#ifdef SO_REUSEPORT + REGISTER_LONG_CONSTANT("SO_REUSEPORT", SO_REUSEPORT, CONST_CS | CONST_PERSISTENT); +#endif REGISTER_LONG_CONSTANT("SO_KEEPALIVE", SO_KEEPALIVE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_DONTROUTE", SO_DONTROUTE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_LINGER", SO_LINGER, CONST_CS | CONST_PERSISTENT); diff --git a/ext/sockets/tests/bug49341.phpt b/ext/sockets/tests/bug49341.phpt new file mode 100644 index 000000000..961b5e7bc --- /dev/null +++ b/ext/sockets/tests/bug49341.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #49341: add SO_REUSEPORT support for socket_set_option() +--SKIPIF-- +<?php +if (!extension_loaded('sockets')) { + die('skip sockets extension not available.'); +} +if (PHP_OS !== 'Darwin' && false === strpos(PHP_OS, 'BSD')) { + die('skip is not *BSD.'); +} +--FILE-- +<?php +var_dump(defined('SO_REUSEPORT')); +--EXPECTF-- +bool(true) diff --git a/ext/sockets/unix_socket_constants.h b/ext/sockets/unix_socket_constants.h index 9e7a11407..fb190d82b 100644 --- a/ext/sockets/unix_socket_constants.h +++ b/ext/sockets/unix_socket_constants.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/sockets/win32_socket_constants.h b/ext/sockets/win32_socket_constants.h index da3baf015..542347dd0 100644 --- a/ext/sockets/win32_socket_constants.h +++ b/ext/sockets/win32_socket_constants.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | |
