diff options
| -rw-r--r-- | ext/sockets/config.m4 | 1 | ||||
| -rw-r--r-- | ext/sockets/sockets.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4 index e88b54ecda..a48e8bf6ce 100644 --- a/ext/sockets/config.m4 +++ b/ext/sockets/config.m4 @@ -31,5 +31,6 @@ if test "$PHP_SOCKETS" != "no"; then PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared]) fi +PHP_CHECK_FUNC(socketpair) PHP_CHECK_FUNC(gethostbyname2) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 44a40a5e01..4ceeecfb9f 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -116,7 +116,9 @@ function_entry sockets_functions[] = { PHP_FE(socket_select, first_through_third_args_force_ref) PHP_FE(socket_create, NULL) PHP_FE(socket_create_listen, NULL) +#ifdef HAVE_SOCKETPAIR PHP_FE(socket_create_pair, fourth_arg_force_ref) +#endif PHP_FE(socket_accept, NULL) PHP_FE(socket_set_nonblock, NULL) PHP_FE(socket_set_block, NULL) @@ -1652,6 +1654,7 @@ PHP_FUNCTION(socket_set_option) } /* }}} */ +#ifdef HAVE_SOCKETPAIR /* {{{ proto bool socket_create_pair(int domain, int type, int protocol, array &fd) Creates a pair of indistinguishable sockets and stores them in fds. */ PHP_FUNCTION(socket_create_pair) @@ -1711,6 +1714,7 @@ PHP_FUNCTION(socket_create_pair) RETURN_TRUE; } /* }}} */ +#endif /* {{{ proto bool socket_shutdown(resource socket[, int how]) Shuts down a socket for receiving, sending, or both. */ |
