diff options
author | Jan Rękorajski | 2021-10-16 19:45:12 (GMT) |
---|---|---|
committer | Jan Rękorajski | 2021-10-16 19:45:12 (GMT) |
commit | f0e435e3eb529af46ddbf095694b41aa67aff7bc (patch) | |
tree | 8b9e815ac3429fa6d3dce738af14ff1a1f467dac /ntp-ipv6.patch | |
parent | be96e354b38e47f8ad37eb244e8c7adab5dd729f (diff) | |
download | ntp-f0e435e3eb529af46ddbf095694b41aa67aff7bc.zip ntp-f0e435e3eb529af46ddbf095694b41aa67aff7bc.tar.gz |
- up to 4.2.8p15HEADauto/th/ntp-4.2.8p15-1master
- fix building with glibc 2.34
Diffstat (limited to 'ntp-ipv6.patch')
-rw-r--r-- | ntp-ipv6.patch | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ntp-ipv6.patch b/ntp-ipv6.patch index 674a6a7..3127123 100644 --- a/ntp-ipv6.patch +++ b/ntp-ipv6.patch @@ -1,7 +1,7 @@ diff -durN -x '*.orig' ntp-4.2.6p1.orig/ntpdate/ntpdate.c ntp-4.2.6p1/ntpdate/ntpdate.c --- ntp-4.2.6p1.orig/ntpdate/ntpdate.c 2010-05-24 19:28:54.000000000 +0200 +++ ntp-4.2.6p1/ntpdate/ntpdate.c 2010-05-24 19:30:19.000000000 +0200 -@@ -1729,11 +1729,13 @@ +@@ -1729,9 +1729,11 @@ } #ifdef IPV6_V6ONLY /* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */ @@ -10,9 +10,7 @@ diff -durN -x '*.orig' ntp-4.2.6p1.orig/ntpdate/ntpdate.c ntp-4.2.6p1/ntpdate/nt + if (res->ai_family == AF_INET6) { + int i = setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)); + if ( i < 0 && errno != ENOPROTOOPT ) { - msyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m"); - exit(1); - /*NOTREACHED*/ + msyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m"); + } } #endif |