Skip to content

Commit

Permalink
network: added preprocessor guard around the port sharing feature
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Mar 13, 2024
1 parent e613b90 commit cd55774
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/flb_network.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ int flb_net_socket_share_port(flb_sockfd_t fd)
int on = 1;
int ret;

#ifdef SO_REUSEPORT
ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on));
#else
ret = -1;
#endif

if (ret == -1) {
flb_errno();
return -1;
Expand Down

0 comments on commit cd55774

Please sign in to comment.