Subject: Re: MD5_CTX define clash (md5.h)
To: Ronald van der Pol <>
From: Frederick Bruckman <>
List: current-users
Date: 07/01/2003 05:49:19
On Tue, 1 Jul 2003, Ronald van der Pol wrote:

> When trying to compile ntp-4.1.80-rc1 on -current I get the following
> errors:

There's a fix in the bk repository already, and for a few other nits,
too. It would be best to get "bk" and pull down the latest sources,
otherwise wait for rc2.

> ---------------
> 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.

FYI, my first guess was to go with openssl, but from the history, it
was clear that they wanted to use the base one (faster?). The patch
that was accepted pares down the includes so a_md5encrypt.c doesn't
see <openssl/evp.h> at all.