From: Alan Coopersmith Date: Fri, 21 Oct 2011 23:17:56 +0000 (-0700) Subject: gallium/auxiliary/util: Solaris also has standard Unix sockets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68657183b0e42093777034460e0a93624b7ba501;p=mesa.git gallium/auxiliary/util: Solaris also has standard Unix sockets Signed-off-by: Alan Coopersmith Reviewed-by: Brian Paul --- 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