[PATCH 06/11] login: re-add lastlog.h header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>

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@xxxxxxxxxxx>

Conflicts:
	login-utils/login.c

Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
---
 configure.ac        | 1 +
 login-utils/login.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index dddc6a9..73c1b29 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 043fce1..3430448 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
-- 
1.8.5.6

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux