From 68657183b0e42093777034460e0a93624b7ba501 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 21 Oct 2011 16:17:56 -0700 Subject: gallium/auxiliary/util: Solaris also has standard Unix sockets Signed-off-by: Alan Coopersmith Reviewed-by: Brian Paul --- src/gallium/auxiliary/util/u_network.c | 9 ++++++--- src/gallium/auxiliary/util/u_network.h | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gallium/auxiliary') 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 # include -#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 # include # include @@ -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 -- cgit v1.2.3