#include <sys/un.h>
#endif
+php_stream_ops php_stream_generic_socket_ops;
+php_stream_ops php_stream_socket_ops;
+php_stream_ops php_stream_udp_socket_ops;
+#ifdef AF_UNIX
+php_stream_ops php_stream_unix_socket_ops;
+php_stream_ops php_stream_unixdg_socket_ops;
+#endif
+
static int php_tcp_sockop_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC);
if (sock->socket != -1) {
/* prevent more data from coming in */
- shutdown(sock->socket, SHUT_RD);
+
+#ifdef AF_UNIX
+ if (stream->ops != &php_stream_unix_socket_ops && stream->ops != &php_stream_unixdg_socket_ops) {
+#endif
+ shutdown(sock->socket, SHUT_RD);
+#ifdef AF_UNIX
+ }
+#endif
/* try to make sure that the OS sends all data before we close the connection.
* Essentially, we are waiting for the socket to become writeable, which means