From: Björn Esser Date: Thu, 24 Jun 2021 10:39:27 +0000 (+0200) Subject: lib/defines.h: Include if present on the system. X-Git-Tag: v4.9~5^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c93897a8d71b9b1790caf3b2dee38dbe62518ae3;p=thirdparty%2Fshadow.git lib/defines.h: Include if present on the system. The functions crypt(3), crypt_gensalt(3), and their feature test macros may be defined in there. Signed-off-by: Björn Esser --- diff --git a/configure.ac b/configure.ac index 111de09e5..881c83824 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_STDBOOL -AC_CHECK_HEADERS(errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \ +AC_CHECK_HEADERS(crypt.h errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \ utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \ utime.h ulimit.h sys/capability.h sys/random.h sys/resource.h \ gshadow.h lastlog.h locale.h rpc/key_prot.h netdb.h acl/libacl.h \ diff --git a/lib/defines.h b/lib/defines.h index 2fb1b56ec..e1500a765 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -4,6 +4,8 @@ #ifndef _DEFINES_H_ #define _DEFINES_H_ +#include "config.h" + #if HAVE_STDBOOL_H # include #else @@ -94,6 +96,14 @@ char *strchr (), *strrchr (), *strtok (); # include #endif +/* + * crypt(3), crypt_gensalt(3), and their + * feature test macros may be defined in here. + */ +#if HAVE_CRYPT_H +# include +#endif + #if TIME_WITH_SYS_TIME # include # include