diff options
author | Ed Schouten <ed@80386.nl> | 2010-01-16 18:33:53 +0000 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2010-01-16 11:05:28 -0800 |
commit | 9792646873ac0e597cc65ef4a056444fd8f9a7fd (patch) | |
tree | 48ed4b0fe321d8f231d2323c182186c044ac3128 /sessreg.h | |
parent | 9ca078f8ffc5ab0c4d0f58be26e885a7ad0b8f39 (diff) |
Allow sessreg to be built without <utmp.h>.
As of 9.0, FreeBSD will only support <utmpx.h>. It only implements the
POSIX interface with minor extensions. There is no need to write to
wtmp and lastlog separately, because this is already done by
pututxline(). Add additional checks to configure.ac to search for the
presence of utmpxname() and updwtmpx().
Signed-off-by: Ed Schouten <ed@80386.nl>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'sessreg.h')
-rw-r--r-- | sessreg.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -51,13 +51,15 @@ #include <sys/types.h> #include <time.h> -#include <utmp.h> + +#ifdef HAVE_UTMP_H +# include <utmp.h> +# define USE_UTMP +#endif #ifdef HAVE_UTMPX_H -# if HAVE_UTMPX_UT_SYSLEN -# include <utmpx.h> -# define USE_UTMPX -# endif +# include <utmpx.h> +# define USE_UTMPX #endif #ifdef HAVE_SYS_PARAM_H |