summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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 <pty.h>
+# include <pty.h>
+# ifdef HAVE_UTMPX_H
+# include <utmp.h>
+# endif
+# ifdef HAVE_LIBUTIL_H
+# include <libutil.h>
+# endif
#endif
#ifdef __linux__