]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: re-add utmp.h for Debian GNU/kFreeBSD
authorRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 1 Dec 2016 08:57:51 +0000 (09:57 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 7 Dec 2016 11:35:24 +0000 (12:35 +0100)
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>
configure.ac
term-utils/agetty.c

index afb255e93ad223d490229fd4cddadda3475c001f..e9901bc81ec024e3a87d0b000166657316d1cf4e 100644 (file)
@@ -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 \
 ])
 
index 46eea0122b22f555175719a0e031e8e3fad2ec61..95236ce9776bb5297ddf02ddb1874e8ba50fdc1f 100644 (file)
 #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__