From 4f7c28158308563dcad912d87a0031d095d4690a Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 5 Jan 2013 11:56:51 +0200 Subject: Write utmp/wtmp records in sysvinit mode. * configure.ac: Check for utmp.h, utmpx.h * src/utmp.c: New file. * src/Makefile.am: Add utmp.c * src/pies.h (sysvinit_acct): New proto. * src/progman.c (prog_start, progman_cleanup): Call sysvinit_acct. * src/sysvinit.c (inittrans): Call sysvinit_acct. Set proctitle. --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0c1d2b9..5a42270 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,7 @@ AC_PROG_LEX # Checks for libraries. # Checks for header files. -AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h syslog.h unistd.h]) +AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h syslog.h unistd.h utmp.h utmpx.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_UID_T @@ -48,6 +48,18 @@ IU_CHECK_MEMBERS([struct msghdr.msg_control, struct msghdr.msg_accrights], , , [#include #include ]) +IU_CHECK_MEMBERS([struct utmp.ut_tv, struct utmp.ut_name, + struct utmp.ut_user, struct utmp.ut_time, + struct utmp.ut_host], , , + [#include ]) + +if test "$ac_cv_header_utmpx_h" = yes; then + IU_CHECK_MEMBERS([struct utmpx.ut_tv, struct utmpx.ut_name, + struct utmpx.ut_user, struct utmpx.ut_time, + struct utmpx.ut_host], , , + [#include ]) +fi + # Checks for library functions. AC_FUNC_CHOWN AC_FUNC_FORK -- cgit v1.2.1