1 --- ntp-4.2.4p5/ntpdate/ntpdate.c.org 2008-10-08 17:42:22.981586584 +0200
2 +++ ntp-4.2.4p5/ntpdate/ntpdate.c 2008-10-08 17:42:36.614918959 +0200
3 @@ -1776,11 +1776,13 @@
6 /* Restricts AF_INET6 socket to IPv6 communications (see RFC 2553bis-03) */
7 - if (res->ai_family == AF_INET6)
8 - if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) {
9 + if (res->ai_family == AF_INET6) {
10 + int i = setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval));
11 + if (i < 0 && errno != ENOPROTOOPT) {
12 netsyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m");