Skip to content

Commit

Permalink
[Minor] REUSEPORT is broken everywhere but Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Jun 10, 2020
1 parent 25584ee commit 5dac1cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libserver/worker_util.c
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/libutil/addr.c
Expand Up @@ -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;

Expand Down

0 comments on commit 5dac1cf

Please sign in to comment.