summaryrefslogtreecommitdiff
path: root/ext/sockets/sockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sockets/sockets.c')
-rw-r--r--ext/sockets/sockets.c4
1 files changed, 4 insertions, 0 deletions
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. */