diff options
author | Bruno Haible <bruno@clisp.org> | 2018-04-24 20:04:05 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2018-04-24 20:05:12 +0200 |
commit | 37efd1c53621f26d935e5fb6d8e49dbe9a4cd8df (patch) | |
tree | 34271f0f222d46a47174081c47bb7c22b0f9dbd1 /tests | |
parent | 652a68a1e87d1458198a7eae475d5a417bfed8ec (diff) | |
download | gnulib-37efd1c53621f26d935e5fb6d8e49dbe9a4cd8df.tar.gz |
sys_socket: Make SO_REUSEPORT available across platforms.
Reported by Tom G. Christensen <tgc@jupiterrise.com>.
* lib/sys_socket.in.h (SO_REUSEPORT): New macro.
* doc/posix-headers/sys_socket.texi: Mention the issue.
* tests/test-poll.c (SO_REUSEPORT): Remove.
* tests/test-select.h: Include <sys/socket.h>.
(SO_REUSEPORT): Remove.
* modules/select-tests (Depends-on): Add 'sys_socket'.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-poll.c | 4 | ||||
-rw-r--r-- | tests/test-select.h | 5 |
2 files changed, 1 insertions, 8 deletions
diff --git a/tests/test-poll.c b/tests/test-poll.c index c5e0a92deb..ebace0f186 100644 --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -52,10 +52,6 @@ SIGNATURE_CHECK (poll, int, (struct pollfd[], nfds_t, int)); #include <sys/wait.h> #endif -#ifndef SO_REUSEPORT -#define SO_REUSEPORT SO_REUSEADDR -#endif - #define TEST_PORT 12345 diff --git a/tests/test-select.h b/tests/test-select.h index d751e42450..364687b6c5 100644 --- a/tests/test-select.h +++ b/tests/test-select.h @@ -18,6 +18,7 @@ #include <stdio.h> #include <string.h> +#include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> @@ -37,10 +38,6 @@ # include <sys/wait.h> #endif -#ifndef SO_REUSEPORT -# define SO_REUSEPORT SO_REUSEADDR -#endif - #define TEST_PORT 12345 |