Subject: MD5_CTX define clash (md5.h)
To: None <current-users@netbsd.org>
From: Ronald van der Pol <Ronald.vanderPol@rvdp.org>
List: current-users
Date: 07/01/2003 11:21:38
When trying to compile ntp-4.1.80-rc1 on -current I get the following
errors:

---------------
Making all in libntp
source='a_md5encrypt.c' object='a_md5encrypt.o' libtool=no  depfile='.deps/a_md5encrypt.Po' tmpdepfile='.deps/a_md5encrypt.TPo'  depmode=gcc /usr/pkg/bin/bash ../depcomp  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include   -I/usr/include  -g -O2 -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -pipe -c `test -f 'a_md5encrypt.c' || echo './'`a_md5encrypt.c
In file included from ../include/ntp_md5.h:6,
                 from a_md5encrypt.c:29:
/usr/include/md5.h:42: conflicting types for `MD5_CTX'
/usr/include/openssl/md5.h:80: previous declaration of `MD5_CTX'
*** Error code 1

Stop.
---------------

The same happens on 1.6.1_STABLE.

I removed the #include "ntp_md5.h" as a workaround, but I wonder
why there are two md5.h include files in the base system with
slightly different definitions. Which is the "real" one?

FreeBSD's /usr/include/openssl/evp.h has
#ifndef OPENSSL_NO_MD5
#include <openssl/md5.h>
#endif
NetBSD's /usr/include/openssl/evp.h does not.
The ntp configure makes use of OPENSSL_NO_MD5. But I find this a little odd.

	rvdp