]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 918] Only use a native md5.h if MD5Init() is available
authorHarlan Stenn <stenn@ntp.org>
Tue, 18 Dec 2007 09:02:42 +0000 (04:02 -0500)
committerHarlan Stenn <stenn@ntp.org>
Tue, 18 Dec 2007 09:02:42 +0000 (04:02 -0500)
bk: 47678cb2io7JuzQpa6USCyV2gRYbrg

ChangeLog
configure.ac
include/ntp_md5.h

index 7a5fb663cf4be7e8a79a33c6f88275c148b6f489..7336deb8b9644d0000099db2c4ec26a680389d0d 100644 (file)
--- 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.
index e41e0967678796958e57728c309968eff7732aa1..bd634124771e40b3035027d111e8387237dc8850 100644 (file)
@@ -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 <sys/types.h>
 #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)
index 2d92d68777badef7589dd5def838a3bcc38c97d5..5e2206b008abcbf401ea06b8e3d1e098d6b74715 100644 (file)
@@ -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 <md5.h>
 #else
 # include "isc/md5.h"