diff --git a/lib/isc/netmgr/netmgr-int.h b/lib/isc/netmgr/netmgr-int.h index f54f590f89..c6a0da0a72 100644 --- a/lib/isc/netmgr/netmgr-int.h +++ b/lib/isc/netmgr/netmgr-int.h @@ -53,7 +53,7 @@ #endif #if defined(SO_REUSEPORT_LB) || (defined(SO_REUSEPORT) && defined(__linux__)) -#define HAVE_REUSEPORT_LB 1 +#define HAVE_SO_REUSEPORT_LB 1 #endif /* diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index 5dc121f655..24f43c9856 100644 --- a/lib/isc/netmgr/tcp.c +++ b/lib/isc/netmgr/tcp.c @@ -406,7 +406,9 @@ isc_nm_listentcp(isc_nm_t *mgr, isc_nmiface_t *iface, isc_nmsocket_t *sock = NULL; sa_family_t sa_family = iface->addr.type.sa.sa_family; size_t children_size = 0; +#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) uv_os_sock_t fd = -1; +#endif REQUIRE(VALID_NM(mgr)); diff --git a/lib/isc/netmgr/tcpdns.c b/lib/isc/netmgr/tcpdns.c index f52cbca3e9..1372b63573 100644 --- a/lib/isc/netmgr/tcpdns.c +++ b/lib/isc/netmgr/tcpdns.c @@ -450,7 +450,9 @@ isc_nm_listentcpdns(isc_nm_t *mgr, isc_nmiface_t *iface, isc_nmsocket_t *sock = NULL; sa_family_t sa_family = iface->addr.type.sa.sa_family; size_t children_size = 0; +#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) uv_os_sock_t fd = -1; +#endif REQUIRE(VALID_NM(mgr)); diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index f69f6feb19..411b8deacf 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -106,7 +106,9 @@ isc_nm_listenudp(isc_nm_t *mgr, isc_nmiface_t *iface, isc_nm_recv_cb_t cb, isc_nmsocket_t *sock = NULL; sa_family_t sa_family = iface->addr.type.sa.sa_family; size_t children_size = 0; +#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) uv_os_sock_t fd = -1; +#endif REQUIRE(VALID_NM(mgr)); @@ -269,7 +271,7 @@ isc__nm_async_udplisten(isc__networker_t *worker, isc__netievent_t *ev0) { uv_bind_flags |= UV_UDP_IPV6ONLY; } -#if HAVE_SO_REUSEPORT_LB || WIN32 +#if HAVE_SO_REUSEPORT_LB || defined(WIN32) r = isc_uv_udp_freebind(&sock->uv_handle.udp, &sock->parent->iface->addr.type.sa, uv_bind_flags);