gallium/auxiliary/util: Solaris also has standard Unix sockets
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Fri, 21 Oct 2011 23:17:56 +0000 (16:17 -0700)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Fri, 28 Oct 2011 05:43:02 +0000 (22:43 -0700)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_network.c
src/gallium/auxiliary/util/u_network.h

index 77f2c5fc7de658623c501d93210bb50656610af1..45b3691f901391368ccd0090f1d596c4432a3ffc 100644 (file)
@@ -6,7 +6,8 @@
 #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
 #  include <winsock2.h>
 #  include <windows.h>
-#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN)
+#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \
+   defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS)
 #  include <sys/socket.h>
 #  include <netinet/in.h>
 #  include <unistd.h>
@@ -54,7 +55,8 @@ u_socket_close(int s)
    if (s < 0)
       return;
 
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) \
+    || defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS)
    shutdown(s, SHUT_RDWR);
    close(s);
 #elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
@@ -169,7 +171,8 @@ u_socket_listen_on_port(uint16_t portnum)
 void
 u_socket_block(int s, boolean block)
 {
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) \
+    || defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS)
    int old = fcntl(s, F_GETFL, 0);
    if (old == -1)
       return;
index 187dcab86e7d16ee663f6ae9b7305e093f5934a6..61fe9a3c60f45d0c0dd491b3831a8ab55b254306 100644 (file)
@@ -6,7 +6,8 @@
 
 #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
 #  define PIPE_HAVE_SOCKETS
-#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
+#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \
+    defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS)
 #  define PIPE_HAVE_SOCKETS
 #endif