Package: ntp Version: 4.2.2+dfsg.2-1 Severity: important Tags: patch On "some" architectures where IPv6 is not working, some mismatching ifdefs leads to FTBFS. A patch is attached.
MAXHOSTNAMELEN is used unconditionnaly, while setting this constant is NOT a MUST in POSIX and an absolutly unnecessary limit on Hurd and cause an FTBFS on this architecture. A patch is attached. Both patches apply cleanly when appended in debian/series. Regards.
--- orig/libisc/net.c 2006-06-06 20:16:24.000000000 +0000 +++ new/libisc/net.c 2006-09-13 18:17:29.000000000 +0000 @@ -201,6 +201,7 @@ #endif /* IPV6_V6ONLY */ } +#ifndef IPV6_V6ONLY static void initialize_ipv6only(void) { RUNTIME_CHECK(isc_once_do(&once_ipv6only, @@ -257,6 +258,7 @@ try_ipv6pktinfo) == ISC_R_SUCCESS); } #endif /* WANT_IPV6 */ +#endif /* ISC_PLATFORM_HAVEIPV6 */ isc_result_t isc_net_probe_ipv6only(void) {
--- orig/ntpd/ntp_intres.c 2006-09-14 16:24:11.000000000 +0000 +++ new/ntpd/ntp_intres.c 2006-09-14 16:24:16.000000000 +0000 @@ -41,7 +41,7 @@ #include <arpa/inet.h> /**/ #ifdef HAVE_SYS_PARAM_H -# include <sys/param.h> /* MAXHOSTNAMELEN (often) */ +# include <sys/param.h> /* NI_MAXHOST (often) */ #endif #include <isc/net.h> @@ -524,10 +524,10 @@ msyslog(LOG_INFO, "findhostaddr: Resolving %s>", stoa(&entry->peer_store)); #endif - entry->ce_name = emalloc(MAXHOSTNAMELEN); + entry->ce_name = emalloc(NI_MAXHOST); error = getnameinfo((const struct sockaddr *)&entry->peer_store, SOCKLEN(&entry->peer_store), - (char *)&entry->ce_name, MAXHOSTNAMELEN, + (char *)&entry->ce_name, NI_MAXHOST, NULL, 0, 0); } #ifdef DEBUG
-- Marc Dequènes (Duck)
pgpq1Ha0mMMv2.pgp
Description: PGP signature