Mesa (master): gallium/auxiliary/util: Solaris also has standard Unix sockets

Alan Coopersmith alanc at kemper.freedesktop.org
Thu Oct 27 22:43:40 PDT 2011


Module: Mesa
Branch: master
Commit: 68657183b0e42093777034460e0a93624b7ba501
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=68657183b0e42093777034460e0a93624b7ba501

Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Fri Oct 21 16:17:56 2011 -0700

gallium/auxiliary/util: Solaris also has standard Unix sockets

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/gallium/auxiliary/util/u_network.c |    9 ++++++---
 src/gallium/auxiliary/util/u_network.h |    3 ++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_network.c b/src/gallium/auxiliary/util/u_network.c
index 77f2c5f..45b3691 100644
--- a/src/gallium/auxiliary/util/u_network.c
+++ b/src/gallium/auxiliary/util/u_network.c
@@ -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;
diff --git a/src/gallium/auxiliary/util/u_network.h b/src/gallium/auxiliary/util/u_network.h
index 187dcab..61fe9a3 100644
--- a/src/gallium/auxiliary/util/u_network.h
+++ b/src/gallium/auxiliary/util/u_network.h
@@ -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
 



More information about the mesa-commit mailing list