diff --git a/src/flb_network.c b/src/flb_network.c index 11efbb7d60b..e53030ba742 100644 --- a/src/flb_network.c +++ b/src/flb_network.c @@ -1819,10 +1819,10 @@ flb_sockfd_t flb_net_accept(flb_sockfd_t server_fd) */ #ifdef FLB_HAVE_ACCEPT4 - remote_fd = accept4(server_fd, &sock_addr, &socket_size, + remote_fd = accept4(server_fd, (struct sockaddr*)&sock_addr, &socket_size, SOCK_NONBLOCK | SOCK_CLOEXEC); #else - remote_fd = accept(server_fd, &sock_addr, &socket_size); + remote_fd = accept(server_fd, (struct sockaddr*)&sock_addr, &socket_size); flb_net_socket_nonblocking(remote_fd); #endif