Gergely Nagy | 8 Jun 2012 13:07
Picon
Gravatar

[PATCH] afuser: Use utmpx when available, instead of utmp

FreeBSD 9 removed support for utmp, and one must use the
POSIX-specified utmpx instead. The same utmpx is available on Linux
too (and it is the same as utmp there).

The patch below converts afuser to use utmpx when available, utmp
otherwise. It is based on the post-build sed magic applied to
syslog-ng within the FreeBSD ports collection, with other bits based
on a patch from Alex Zimnitsky.

Signed-off-by: Gergely Nagy <algernon <at> balabit.hu>
---
 configure.in            |    4 ++--
 lib/utils.c             |    4 +++-
 lib/utils.h             |    7 ++++++-
 modules/afuser/afuser.c |   20 +++++++++++++++++++-
 4 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/configure.in b/configure.in
index aafb980..c76d7d9 100644
--- a/configure.in
+++ b/configure.in
 <at>  <at>  -383,7 +383,7  <at>  <at>  dnl ***************************************************************************

 AC_HEADER_STDC
 AC_CHECK_HEADER(dmalloc.h)
-AC_CHECK_HEADERS(strings.h getopt.h stropts.h sys/strlog.h door.h sys/capability.h sys/prctl.h)
+AC_CHECK_HEADERS(strings.h getopt.h stropts.h sys/strlog.h door.h sys/capability.h sys/prctl.h utmpx.h)
 AC_CHECK_HEADERS(tcpd.h)

 
(Continue reading)


Gmane