From: Alejandro Colomar Date: Fri, 2 Dec 2022 20:50:40 +0000 (+0100) Subject: Assume exists X-Git-Tag: 4.14.0-rc1~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b47aa1e9aaf4;p=thirdparty%2Fshadow.git Assume exists It is required by POSIX.1-2001. Cc: Christian Göttsche Signed-off-by: Alejandro Colomar --- diff --git a/configure.ac b/configure.ac index a534fc03e..185b85cb8 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ dnl Checks for libraries. dnl Checks for header files. AC_CHECK_HEADERS(crypt.h utmp.h \ - utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.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 rpc/key_prot.h netdb.h acl/libacl.h \ attr/libattr.h attr/error_context.h) diff --git a/lib/defines.h b/lib/defines.h index db3adb3f8..4be6ecb34 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -279,21 +279,8 @@ extern char *strdup (); #endif /* Maximum length of usernames */ -#ifdef HAVE_UTMPX_H -# include -# define USER_NAME_MAX_LENGTH (sizeof (((struct utmpx *)NULL)->ut_user)) -#else -# include -# ifdef HAVE_STRUCT_UTMP_UT_USER -# define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_user)) -# else -# ifdef HAVE_STRUCT_UTMP_UT_NAME -# define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_name)) -# else -# define USER_NAME_MAX_LENGTH 32 -# endif -# endif -#endif +#include +#define USER_NAME_MAX_LENGTH (sizeof (((struct utmpx *)NULL)->ut_user)) /* Maximum length of passwd entry */ #define PASSWD_ENTRY_MAX_LENGTH 32768