aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuediger Meier <ruediger.meier@ga-group.nl>2016-12-01 09:52:09 +0100
committerKarel Zak <kzak@redhat.com>2016-12-07 12:35:24 +0100
commit6578ced75c1314b7b49644bd0324194e9849d935 (patch)
tree95da601709a5b65a60caec2f3a623950af9f497b
parenta924b4004c154d6f75afd9e172e2595194cb60cc (diff)
downloadutil-linux-6578ced75c1314b7b49644bd0324194e9849d935.tar.gz
login: re-add lastlog.h header
This include was removed in a365953a but we will need it again when we move from utmp.h to utmpx.h. On Linux (glibc, musl) the struct lastlog is defined in utmp.h and lastlog.h just includes utmp.h. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> Conflicts: login-utils/login.c Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
-rw-r--r--configure.ac1
-rw-r--r--login-utils/login.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index dddc6a9ca7..73c1b29e4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -207,6 +207,7 @@ AC_CHECK_HEADERS([ \
fcntl.h \
getopt.h \
inttypes.h \
+ lastlog.h \
linux/btrfs.h \
linux/cdrom.h \
linux/falloc.h \
diff --git a/login-utils/login.c b/login-utils/login.c
index 043fce1295..3430448658 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -46,6 +46,9 @@
#include <grp.h>
#include <pwd.h>
#include <utmp.h>
+#ifdef HAVE_LASTLOG_H
+# include <lastlog.h>
+#endif
#include <stdlib.h>
#include <sys/syslog.h>
#ifdef HAVE_LINUX_MAJOR_H