* [Bug 1416] MAXDNAME undefined on Solaris 2.6.
* [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir.
* [Bug 1424] Fix check for rtattr (rtnetlink.h).
+* [Bug 1425] unpeer by association ID sets up for duplicate free().
* [Bug 1426] scripts/VersionName needs . on the search path.
* [Bug 1427] quote missing in ./build - shows up on NetBSD.
* [Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h
* [Bug 1429] ntpd -4 option does not reliably force IPv4 resolution.
* [Bug 1431] System headers must come before ntp headers in ntp_intres.c .
+* [Bug 1434] HP-UX 11 ip_mreq undeclared, _HPUX_SOURCE helps some.
---
(4.2.6p1-RC1) 2009/12/20 Released by Harlan Stenn <stenn@ntp.org>
yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
esac
-AC_CACHE_CHECK([for kernel multicast support], ac_cv_var_mcast,
- [ac_cv_var_mcast=no
- case "$host" in
- i386-sequent-sysv4) ;;
- *) AC_EGREP_CPP(yes,
- [#include <netinet/in.h>
-#ifdef IP_ADD_MEMBERSHIP
- yes
-#endif
- ], ac_cv_var_mcast=yes) ;;
- esac])
-case "$ac_cv_var_mcast" in
- yes)
- AC_DEFINE(MCAST, 1, [Does the kernel support multicasting IP?])
- AC_CACHE_CHECK([[arg type needed for IP*_MULTICAST_LOOP for setsockopt()]],
- ac_cv_var_typeof_ip_multicast_loop,
- [case "$host" in
- *-*-netbsd*|*-*-*linux*)
- ac_cv_var_typeof_ip_multicast_loop=u_int
- ;;
- *-*-winnt*)
- ac_cv_var_typeof_ip_multicast_loop=BOOL
- ;;
- *) ac_cv_var_typeof_ip_multicast_loop=u_char
+AC_CACHE_CHECK(
+ [for multicast IP support],
+ ntp_cv_multicast,
+ [
+ ntp_cv_multicast=no
+ case "$host" in
+ i386-sequent-sysv4)
;;
- esac])
- AC_DEFINE_UNQUOTED(TYPEOF_IP_MULTICAST_LOOP,
- $ac_cv_var_typeof_ip_multicast_loop,
- [What type to use for setsockopt])
- ;;
+ *)
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM(
+ [
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ ],
+ [
+ struct ip_mreq ipmr;
+ ipmr.imr_interface.s_addr = 0;
+ ]
+ ),
+ [ntp_cv_multicast=yes],
+ []
+ )
+ esac
+ ]
+)
+
+case "$ntp_cv_multicast" in
+ yes)
+ AC_DEFINE(MCAST, 1, [Does the target support multicast IP?])
+ AC_CACHE_CHECK(
+ [[arg type needed for setsockopt() IP*_MULTICAST_LOOP]],
+ ntp_cv_typeof_ip_multicast_loop,
+ [
+ case "$host" in
+ *-*-netbsd*|*-*-*linux*)
+ ntp_cv_typeof_ip_multicast_loop=u_int
+ ;;
+ *-*-winnt*)
+ ntp_cv_typeof_ip_multicast_loop=BOOL
+ ;;
+ *)
+ ntp_cv_typeof_ip_multicast_loop=u_char
+ esac
+ ]
+ )
+ AC_DEFINE_UNQUOTED([TYPEOF_IP_MULTICAST_LOOP],
+ $ntp_cv_typeof_ip_multicast_loop,
+ [What type to use for setsockopt]
+ )
esac
AC_CACHE_CHECK([[availability of ntp_{adj,get}time()]], ac_cv_var_ntp_syscalls,
* to using numeric IP addresses.
*/
#if defined(VMS) || defined (SYS_VXWORKS) || \
- (!defined(HAVE_FORK) && !defined(SYS_WINNT))
+ (!defined(HAVE_WORKING_FORK) && !defined(SYS_WINNT))
#define NO_INTRES
#endif
ntp_os_cflags="-Ae -Wp,-H18816"
;;
esac
+ ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE"
;;
hpux*)
case "$GCC" in
# use Ansi compiler on HPUX
ntp_os_cflags="-Ae"
esac
+ ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE"
;;
irix6*)
case "$CC" in
unpeer(peer);
}
- /* Ok, everything done. Free up peer node memory */
- free_node(curr_unpeer);
continue;
}
{
int i = 0;
DEBUGMSGT(("daemonize","deamonizing...\n"));
-#if HAVE_FORK
+#if HAVE_WORKING_FORK
/*
* Fork to return control to the invoking process and to
* guarantee that we aren't a process group leader.
}
#endif /* !WIN32 */
}
-#endif /* HAVE_FORK */
+#endif /* HAVE_WORKING_FORK */
return i;
}
AC_DEFINE(ISC_PLATFORM_NEEDPORTT, 1, [Declare in_port_t?])
esac
+AC_CACHE_CHECK(
+ [for multicast IP support],
+ ntp_cv_multicast,
+ [
+ ntp_cv_multicast=no
+ case "$host" in
+ i386-sequent-sysv4)
+ ;;
+ *)
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM(
+ [
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ ],
+ [
+ struct ip_mreq ipmr;
+ ipmr.imr_interface.s_addr = 0;
+ ]
+ ),
+ [ntp_cv_multicast=yes],
+ []
+ )
+ esac
+ ]
+)
+
+case "$ntp_cv_multicast" in
+ yes)
+ AC_DEFINE(MCAST, 1, [Does the target support multicast IP?])
+ AC_CACHE_CHECK(
+ [[arg type needed for setsockopt() IP*_MULTICAST_LOOP]],
+ ntp_cv_typeof_ip_multicast_loop,
+ [
+ case "$host" in
+ *-*-netbsd*|*-*-*linux*)
+ ntp_cv_typeof_ip_multicast_loop=u_int
+ ;;
+ *-*-winnt*)
+ ntp_cv_typeof_ip_multicast_loop=BOOL
+ ;;
+ *)
+ ntp_cv_typeof_ip_multicast_loop=u_char
+ esac
+ ]
+ )
+ AC_DEFINE_UNQUOTED([TYPEOF_IP_MULTICAST_LOOP],
+ $ntp_cv_typeof_ip_multicast_loop,
+ [What type to use for setsockopt]
+ )
+esac
+
AC_SEARCH_LIBS([inet_ntop], [resolv], , , [-lsocket -lnsl])
AC_CHECK_FUNC(inet_ntop, [], [AC_DEFINE(ISC_PLATFORM_NEEDNTOP, 1, [ISC: provide inet_ntop()])])
AC_CHECK_FUNC(inet_pton, [], [AC_DEFINE(ISC_PLATFORM_NEEDPTON, 1, [ISC: provide inet_pton()])])
setsockopt(rsock, SOL_SOCKET, SO_REUSEADDR, &btrue, sizeof(btrue));
if (IS_IPV4(sas)) {
+#ifndef MCAST
+ return BROADCAST_FAILED;
+#else
struct ip_mreq mdevadr;
+ TYPEOF_IP_MULTICAST_LOOP mtrue = 1;
+
if (bind(rsock, &sas->sa, SOCKLEN(sas)) < 0) {
if (ENABLED_OPT(NORMALVERBOSE))
}
- if (setsockopt(rsock, IPPROTO_IP, IP_MULTICAST_LOOP, &btrue, sizeof(btrue)) < 0) {
+ if (setsockopt(rsock, IPPROTO_IP, IP_MULTICAST_LOOP, &mtrue, sizeof(mtrue)) < 0) {
/* some error message regarding setting up multicast loop */
return BROADCAST_FAILED;
}
return BROADCAST_FAILED;
}
}
+#endif /* MCAST */
}
#ifdef ISC_PLATFORM_HAVEIPV6
else if (IS_IPV6(sas)) {