From a4815eb370626ec070b5be0fe4a901feb7c020fa Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Sun, 26 Feb 2017 14:13:27 +0100 Subject: [PATCH] BSD portability fixes --- Makefile | 2 +- config.h | 4 ++++ mkpasswd.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2634a9a..28eb36f 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ mkpasswd_OBJECTS := mkpasswd.o utils.o # FreeBSD #whois_LDADD += -liconv #LIBS += -L/usr/local/lib -lintl -#INCLUDES += -I/usr/local/include +#DEFS += -I/usr/local/include # OS/2 EMX #whois_LDADD += -lsocket diff --git a/config.h b/config.h index ee75c49..2cd4636 100644 --- a/config.h +++ b/config.h @@ -13,6 +13,10 @@ /* autoconf in cpp macros */ +#if defined __NetBSD__ || __OpenBSD__ +# include +#endif + #ifdef linux # define ENABLE_NLS #endif diff --git a/mkpasswd.c b/mkpasswd.c index a872ae3..e2872c7 100644 --- a/mkpasswd.c +++ b/mkpasswd.c @@ -32,6 +32,7 @@ #endif #include #include +#include #include #include #ifdef HAVE_XCRYPT