1 --- ntp-4.2.8p14/ntpdate/ntpdate.c 2020-04-06 19:32:04.312000000 +0200
2 +++ ntp-4.2.8p14/ntpdate/ntpdate.c 2020-04-06 19:35:19.513000000 +0200
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 msyslog(LOG_ERR, "setsockopt() IPV6_V6ONLY failed: %m");