From ea1206975582e85bf0c17c599fcc604ed63e3f4b Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Wed, 10 Jan 2007 21:26:09 +0000 Subject: [PATCH] MFB: Add missing ifdefs --- ext/sockets/php_sockets.h | 2 ++ ext/sockets/sockets.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index de23d01cb5..b3f49a0f93 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -66,7 +66,9 @@ PHP_FUNCTION(socket_recvfrom); PHP_FUNCTION(socket_sendto); PHP_FUNCTION(socket_get_option); PHP_FUNCTION(socket_set_option); +#ifdef HAVE_SHUTDOWN PHP_FUNCTION(socket_shutdown); +#endif PHP_FUNCTION(socket_last_error); PHP_FUNCTION(socket_clear_error); diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 24bbb90d57..85b6eb0604 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -136,7 +136,9 @@ zend_function_entry sockets_functions[] = { PHP_FE(socket_sendto, NULL) PHP_FE(socket_get_option, NULL) PHP_FE(socket_set_option, NULL) +#ifdef HAVE_SHUTDOWN PHP_FE(socket_shutdown, NULL) +#endif PHP_FE(socket_last_error, NULL) PHP_FE(socket_clear_error, NULL) @@ -1786,6 +1788,7 @@ PHP_FUNCTION(socket_create_pair) } /* }}} */ +#ifdef HAVE_SHUTDOWN /* {{{ proto bool socket_shutdown(resource socket[, int how]) U Shuts down a socket for receiving, sending, or both. */ PHP_FUNCTION(socket_shutdown) @@ -1808,6 +1811,7 @@ PHP_FUNCTION(socket_shutdown) RETURN_TRUE; } /* }}} */ +#endif /* {{{ proto int socket_last_error([resource socket]) U Returns the last socket error (either the last used or the provided socket resource) */ -- 2.50.1