Module: Mesa Branch: master Commit: 034bbaa6c0ea0ff1cfc188c6fd49fa068b80be78 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=034bbaa6c0ea0ff1cfc188c6fd49fa068b80be78
Author: Jonathan Gray <j...@jsg.id.au> Date: Wed Feb 28 21:21:14 2018 +1100 gallium/util: use sockets on PIPE_OS_UNIX in u_network Instead of listing all the UNIX PIPE_OS platforms just use PIPE_OS_UNIX. Makes BSD sockets available on PIPE_OS_BSD. Signed-off-by: Jonathan Gray <j...@jsg.id.au> Reviewed-by: Brian Paul <bri...@vmware.com> --- src/gallium/auxiliary/util/u_network.c | 9 +++------ src/gallium/auxiliary/util/u_network.h | 5 +---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/gallium/auxiliary/util/u_network.c b/src/gallium/auxiliary/util/u_network.c index 203205dc62..e74293bb10 100644 --- a/src/gallium/auxiliary/util/u_network.c +++ b/src/gallium/auxiliary/util/u_network.c @@ -9,8 +9,7 @@ # include <winsock2.h> # include <windows.h> # include <ws2tcpip.h> -#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \ - defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS) +#elif defined(PIPE_OS_UNIX) # include <sys/socket.h> # include <netinet/in.h> # include <unistd.h> @@ -58,8 +57,7 @@ u_socket_close(int s) if (s < 0) return; -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) \ - || defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS) +#if defined(PIPE_OS_UNIX) shutdown(s, SHUT_RDWR); close(s); #elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) @@ -181,8 +179,7 @@ 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) || defined(PIPE_OS_SOLARIS) +#if defined(PIPE_OS_UNIX) 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 61fe9a3c60..2b7ce3f4bd 100644 --- a/src/gallium/auxiliary/util/u_network.h +++ b/src/gallium/auxiliary/util/u_network.h @@ -4,10 +4,7 @@ #include "pipe/p_compiler.h" -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) -# define PIPE_HAVE_SOCKETS -#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \ - defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS) +#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) || defined(PIPE_OS_UNIX) # define PIPE_HAVE_SOCKETS #endif _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit