From: Harlan Stenn Date: Tue, 18 Dec 2007 09:02:42 +0000 (-0500) Subject: [Bug 918] Only use a native md5.h if MD5Init() is available X-Git-Tag: NTP_4_2_5P108~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86c3790166f5583a40a41f856550f66d1e143179;p=thirdparty%2Fntp.git [Bug 918] Only use a native md5.h if MD5Init() is available bk: 47678cb2io7JuzQpa6USCyV2gRYbrg --- diff --git a/ChangeLog b/ChangeLog index 7a5fb663c..7336deb8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 918] Only use a native md5.h if MD5Init() is available. * [Bug 979] Provide ntptimeval if it is not otherwise present. * [Bug 634] Re-instantiate syslog() and logfiles after the daemon fork. * [Bug 952] Use md5 code with a friendlier license. diff --git a/configure.ac b/configure.ac index e41e09676..bd6341247 100644 --- a/configure.ac +++ b/configure.ac @@ -341,6 +341,7 @@ AC_CHECK_FUNC(openlog, , AC_CHECK_LIB(syslog, openlog, , , $libxnet -lsocket))) AC_CHECK_LIB(md5, MD5Init, , AC_CHECK_LIB(md, MD5Init)) +AC_CHECK_FUNCS(MD5Init) NTP_LINEEDITLIBS @@ -374,17 +375,11 @@ case "$ac_cv_lib_dns_sd_DNSServiceRegister" in esac AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h math.h) -# HMS: Lame, but fast. -if test -f /etc/redhat-release -then - : -else - AC_CHECK_HEADERS(md5.h, [], [], +AC_CHECK_HEADERS(md5.h, [], [], [#if HAVE_SYS_TYPES_H #include #endif ]) -fi AC_CHECK_HEADERS(memory.h netdb.h poll.h) AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h) AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h) diff --git a/include/ntp_md5.h b/include/ntp_md5.h index 2d92d6877..5e2206b00 100644 --- a/include/ntp_md5.h +++ b/include/ntp_md5.h @@ -2,7 +2,7 @@ * ntp_md5.h: deal with md5.h headers */ -#ifdef HAVE_MD5_H +#if defined HAVE_MD5_H && defined HAVE_MD5INIT # include #else # include "isc/md5.h"