summaryrefslogtreecommitdiff
path: root/gl/tests/test-select.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/tests/test-select.h')
-rw-r--r--gl/tests/test-select.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gl/tests/test-select.h b/gl/tests/test-select.h
index 1169e59290..af0e38cf09 100644
--- a/gl/tests/test-select.h
+++ b/gl/tests/test-select.h
@@ -84,6 +84,9 @@ open_server_socket (void)
s = socket (AF_INET, SOCK_STREAM, 0);
+ x = 1;
+ setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
+
memset (&ia, 0, sizeof (ia));
ia.sin_family = AF_INET;
inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr);
@@ -94,9 +97,6 @@ open_server_socket (void)
exit (77);
}
- x = 1;
- setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
-
if (listen (s, 1) < 0)
{
perror ("listen");