aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-06-10 11:53:23 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-06-10 11:53:23 +0100
commit5dac1cff96ff04cc43d690d3cbaf7ba23b8abaa7 (patch)
treedc5f9a05cdf7236a0f4a9cbac6862731aa44c246 /src
parent25584ee22ca2e17834a4aac2bf8f56f44273646b (diff)
downloadrspamd-5dac1cff96ff04cc43d690d3cbaf7ba23b8abaa7.tar.gz
rspamd-5dac1cff96ff04cc43d690d3cbaf7ba23b8abaa7.zip
[Minor] REUSEPORT is broken everywhere but Linux
Diffstat (limited to 'src')
-rw-r--r--src/libserver/worker_util.c2
-rw-r--r--src/libutil/addr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c
index df3cb7fdf..1c7069521 100644
--- a/src/libserver/worker_util.c
+++ b/src/libserver/worker_util.c
@@ -953,7 +953,7 @@ rspamd_maybe_reuseport_socket (struct rspamd_worker_listen_socket *ls)
return true;
}
-#if defined(SO_REUSEPORT) && defined(SO_REUSEADDR)
+#if defined(SO_REUSEPORT) && defined(SO_REUSEADDR) && defined(LINUX)
nfd = rspamd_inet_address_listen (ls->addr,
(ls->type == RSPAMD_WORKER_SOCKET_UDP ? SOCK_DGRAM : SOCK_STREAM),
diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index bb98dbee2..782b05254 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -1079,7 +1079,7 @@ rspamd_inet_address_listen (const rspamd_inet_addr_t *addr, gint type,
}
#endif
-#if defined(SO_REUSEPORT)
+#if defined(SO_REUSEPORT) && defined(LINUX)
if (opts & RSPAMD_INET_ADDRESS_LISTEN_REUSEPORT) {
on = 1;