summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAlan Coopersmith <[email protected]>2011-10-21 16:17:56 -0700
committerAlan Coopersmith <[email protected]>2011-10-27 22:43:02 -0700
commit68657183b0e42093777034460e0a93624b7ba501 (patch)
tree8bea08cc87af52ef1683609a84b0482cd7e40ccc /src/gallium
parent17a1c0cb0d9e04607c1726d04ef23485979dfc98 (diff)
gallium/auxiliary/util: Solaris also has standard Unix sockets
Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_network.c9
-rw-r--r--src/gallium/auxiliary/util/u_network.h3
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 77f2c5fc7de..45b3691f901 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 187dcab86e7..61fe9a3c60f 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