Lines 1-25
Link Here
|
1 |
--- src/pooler.c.orig 2020-05-26 09:38:55 UTC |
|
|
2 |
+++ src/pooler.c |
3 |
@@ -127,16 +127,16 @@ static bool add_listen(int af, const struct sockaddr * |
4 |
* unportable, so perhaps better to avoid it.) |
5 |
*/ |
6 |
if (af != AF_UNIX && cf_so_reuseport) { |
7 |
-#if defined(SO_REUSEPORT) |
8 |
+#if defined(SO_REUSEPORT_LB) |
9 |
int val = 1; |
10 |
- errpos = "setsockopt/SO_REUSEPORT"; |
11 |
- res = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val)); |
12 |
+ errpos = "setsockopt/SO_REUSEPORT_LB"; |
13 |
+ res = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT_LB, &val, sizeof(val)); |
14 |
if (res < 0) |
15 |
goto failed; |
16 |
-#elif defined(SO_REUSEPORT_LB) |
17 |
+#elif defined(SO_REUSEPORT) |
18 |
int val = 1; |
19 |
- errpos = "setsockopt/SO_REUSEPORT_LB"; |
20 |
- res = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT_LB, &val, sizeof(val)); |
21 |
+ errpos = "setsockopt/SO_REUSEPORT"; |
22 |
+ res = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val)); |
23 |
if (res < 0) |
24 |
goto failed; |
25 |
#else |