diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 87e8cad687c5..d978ebab71b5 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -250,10 +250,11 @@ SUBDIR+= bc SUBDIR+= chkey SUBDIR+= dc SUBDIR+= newkey +.endif + .if ${MK_LIBTHR} != "no" SUBDIR+= csup .endif -.endif .if ${MK_LOCATE} != "no" SUBDIR+= locate diff --git a/usr.bin/csup/Makefile b/usr.bin/csup/Makefile index 7fda5b0198d8..0cea8211fa85 100644 --- a/usr.bin/csup/Makefile +++ b/usr.bin/csup/Makefile @@ -33,8 +33,8 @@ CFLAGS+= -I. -I${.CURDIR} CFLAGS+= -DHAVE_FFLAGS -DNDEBUG WARNS?= 1 -DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD} -LDADD= -lcrypto -lz -lpthread +DPADD= ${LIBMD} ${LIBZ} ${LIBPTHREAD} +LDADD= -lmd -lz -lpthread SCRIPTS= cpasswd.sh MAN= csup.1 cpasswd.1 diff --git a/usr.bin/csup/auth.c b/usr.bin/csup/auth.c index 7ae250037e14..c90d71930fdd 100644 --- a/usr.bin/csup/auth.c +++ b/usr.bin/csup/auth.c @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/usr.bin/csup/misc.c b/usr.bin/csup/misc.c index ae16b59589db..f4170df9f734 100644 --- a/usr.bin/csup/misc.c +++ b/usr.bin/csup/misc.c @@ -28,7 +28,6 @@ #include #include -#include #include #include diff --git a/usr.bin/csup/misc.h b/usr.bin/csup/misc.h index a7ca3a625ac0..b01b77a382af 100644 --- a/usr.bin/csup/misc.h +++ b/usr.bin/csup/misc.h @@ -28,10 +28,18 @@ #ifndef _MISC_H_ #define _MISC_H_ -#include - #include +#ifdef __FreeBSD__ +#include +#define MD5_DIGEST_LENGTH 16 +#define MD5_Init MD5Init +#define MD5_Final MD5Final +#define MD5_Update MD5Update +#else +#include +#endif + /* If we're not compiling in a C99 environment, define the C99 types. */ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901