30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
$OpenBSD: patch-src_libs_zbxcomms_comms_c,v 1.1 2011/04/25 07:42:36 ajacoutot Exp $
|
|
|
|
comms.c:765: error: 'SOL_IPV6' undeclared (first use in this function)
|
|
(patch from FreeBSD)
|
|
|
|
--- src/libs/zbxcomms/comms.c.orig Fri Apr 15 21:17:29 2011
|
|
+++ src/libs/zbxcomms/comms.c Mon Apr 25 08:58:46 2011
|
|
@@ -756,19 +756,14 @@ int zbx_tcp_listen(zbx_sock_t *s, const char *listen_i
|
|
ip ? ip : "-", port, zbx_sock_last_error(), strerror_from_system(zbx_sock_last_error()));
|
|
}
|
|
|
|
-#if defined(IPV6_V6ONLY)
|
|
-#ifdef _WINDOWS
|
|
+#if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY)
|
|
if (PF_INET6 == current_ai->ai_family &&
|
|
ZBX_TCP_ERROR == setsockopt(s->sockets[s->num_socks], IPPROTO_IPV6, IPV6_V6ONLY, (void *)&on, sizeof(on)))
|
|
-#else
|
|
- if (PF_INET6 == current_ai->ai_family &&
|
|
- ZBX_TCP_ERROR == setsockopt(s->sockets[s->num_socks], SOL_IPV6, IPV6_V6ONLY, (void *)&on, sizeof(on)))
|
|
-#endif
|
|
{
|
|
zbx_set_tcp_strerror("setsockopt() with IPV6_V6ONLY for [[%s]:%s] failed with error %d: %s",
|
|
ip ? ip : "-", port, zbx_sock_last_error(), strerror_from_system(zbx_sock_last_error()));
|
|
}
|
|
-#endif /* IPV6_V6ONLY */
|
|
+#endif
|
|
|
|
if (ZBX_TCP_ERROR == bind(s->sockets[s->num_socks], current_ai->ai_addr, current_ai->ai_addrlen))
|
|
{
|