aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuediger Meier <ruediger.meier@ga-group.nl>2016-12-01 09:57:51 +0100
committerKarel Zak <kzak@redhat.com>2016-12-07 12:35:24 +0100
commit77835be2737305c395b0aa18728464b075673555 (patch)
tree4d0a26c3d49c65aee5c155df541f6a347ffcb0c8
parent85d846b88a1ca34a252d14130c6541a82f68ad83 (diff)
downloadutil-linux-77835be2737305c395b0aa18728464b075673555.tar.gz
agetty: re-add utmp.h for Debian GNU/kFreeBSD
It's needed there to get login_tty(). On normal FreeBSD we would need libutil.h. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
-rw-r--r--configure.ac2
-rw-r--r--term-utils/agetty.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index afb255e93a..e9901bc81e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,6 +208,7 @@ AC_CHECK_HEADERS([ \
getopt.h \
inttypes.h \
lastlog.h \
+ libutil.h \
linux/btrfs.h \
linux/cdrom.h \
linux/falloc.h \
@@ -257,6 +258,7 @@ AC_CHECK_HEADERS([ \
sys/un.h \
unistd.h \
shadow.h \
+ utmp.h \
utmpx.h \
])
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 46eea0122b..95236ce977 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -55,7 +55,13 @@
#endif
#if defined(__FreeBSD_kernel__)
-#include <pty.h>
+# include <pty.h>
+# ifdef HAVE_UTMPX_H
+# include <utmp.h>
+# endif
+# ifdef HAVE_LIBUTIL_H
+# include <libutil.h>
+# endif
#endif
#ifdef __linux__