From 77835be2737305c395b0aa18728464b075673555 Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Thu, 1 Dec 2016 09:57:51 +0100 Subject: [PATCH] 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 --- configure.ac | 2 ++ term-utils/agetty.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index afb255e93..e9901bc81 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 46eea0122..95236ce97 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -55,7 +55,13 @@ #endif #if defined(__FreeBSD_kernel__) -#include +# include +# ifdef HAVE_UTMPX_H +# include +# endif +# ifdef HAVE_LIBUTIL_H +# include +# endif #endif #ifdef __linux__