[package] chrony: fix build when ipv6 is globally disabled (#11790)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@33046 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
035b8eda21
commit
0bb3eb53ab
34
net/chrony/patches/002-ipv6_disabled_fixes.patch
Normal file
34
net/chrony/patches/002-ipv6_disabled_fixes.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
--- a/ntp_io.c
|
||||||
|
+++ b/ntp_io.c
|
||||||
|
@@ -355,6 +355,7 @@ read_from_socket(void *anything)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef HAVE_IPV6
|
||||||
|
#ifdef IPV6_PKTINFO
|
||||||
|
if (cmsg->cmsg_level == IPPROTO_IPV6 && cmsg->cmsg_type == IPV6_PKTINFO) {
|
||||||
|
struct in6_pktinfo ipi;
|
||||||
|
@@ -365,6 +366,7 @@ read_from_socket(void *anything)
|
||||||
|
remote_addr.local_ip_addr.family = IPADDR_INET6;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifdef SO_TIMESTAMP
|
||||||
|
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SO_TIMESTAMP) {
|
||||||
|
@@ -466,6 +468,7 @@ send_packet(void *packet, int packetlen,
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef HAVE_IPV6
|
||||||
|
#ifdef IPV6_PKTINFO
|
||||||
|
if (remote_addr->local_ip_addr.family == IPADDR_INET6) {
|
||||||
|
struct cmsghdr *cmsg;
|
||||||
|
@@ -484,6 +487,7 @@ send_packet(void *packet, int packetlen,
|
||||||
|
sizeof(ipi->ipi6_addr.s6_addr));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
LOG(LOGS_INFO, LOGF_NtpIO, "sending to %s:%d from %s",
|
Loading…
x
Reference in New Issue
Block a user