On FreeBSD just use the MD5 implementation of libmd rather than that of
libcrypto so we don't need to relinquish csup when world is built without OpenSSL.
This commit is contained in:
parent
6cedd609b7
commit
78dbe84377
@ -250,10 +250,11 @@ SUBDIR+= bc
|
|||||||
SUBDIR+= chkey
|
SUBDIR+= chkey
|
||||||
SUBDIR+= dc
|
SUBDIR+= dc
|
||||||
SUBDIR+= newkey
|
SUBDIR+= newkey
|
||||||
|
.endif
|
||||||
|
|
||||||
.if ${MK_LIBTHR} != "no"
|
.if ${MK_LIBTHR} != "no"
|
||||||
SUBDIR+= csup
|
SUBDIR+= csup
|
||||||
.endif
|
.endif
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${MK_LOCATE} != "no"
|
.if ${MK_LOCATE} != "no"
|
||||||
SUBDIR+= locate
|
SUBDIR+= locate
|
||||||
|
@ -33,8 +33,8 @@ CFLAGS+= -I. -I${.CURDIR}
|
|||||||
CFLAGS+= -DHAVE_FFLAGS -DNDEBUG
|
CFLAGS+= -DHAVE_FFLAGS -DNDEBUG
|
||||||
WARNS?= 1
|
WARNS?= 1
|
||||||
|
|
||||||
DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD}
|
DPADD= ${LIBMD} ${LIBZ} ${LIBPTHREAD}
|
||||||
LDADD= -lcrypto -lz -lpthread
|
LDADD= -lmd -lz -lpthread
|
||||||
|
|
||||||
SCRIPTS= cpasswd.sh
|
SCRIPTS= cpasswd.sh
|
||||||
MAN= csup.1 cpasswd.1
|
MAN= csup.1 cpasswd.1
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <openssl/md5.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <openssl/md5.h>
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
@ -28,10 +28,18 @@
|
|||||||
#ifndef _MISC_H_
|
#ifndef _MISC_H_
|
||||||
#define _MISC_H_
|
#define _MISC_H_
|
||||||
|
|
||||||
#include <openssl/md5.h>
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <md5.h>
|
||||||
|
#define MD5_DIGEST_LENGTH 16
|
||||||
|
#define MD5_Init MD5Init
|
||||||
|
#define MD5_Final MD5Final
|
||||||
|
#define MD5_Update MD5Update
|
||||||
|
#else
|
||||||
|
#include <openssl/md5.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If we're not compiling in a C99 environment, define the C99 types. */
|
/* If we're not compiling in a C99 environment, define the C99 types. */
|
||||||
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901
|
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user