diff options
author | Ed Schouten <ed@80386.nl> | 2011-06-26 14:04:20 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-06-26 09:30:31 -0700 |
commit | 18d68ce74bd810bc09f99a476798b8e4a66ec494 (patch) | |
tree | c6defc3bc8077905ada0a235df8fc41ae9f92672 /sessreg.h | |
parent | 9e93c5f65a22824f6b4af7ee68944f2226f7efa7 (diff) |
Make lastlog work on BSD systems without <lastlog.h>.
FreeBSD 8.x and lower have struct lastlog in <utmp.h>. Add a specific
Autoconf check for struct lastlog, where we include both <utmp.h> and
<lastlog.h>.
Also, change NO_LASTLOG to a definition for the opposite; USE_LASTLOG.
This is more consistent with USE_UTMP and USE_UTMPX.
Signed-off-by: Ed Schouten <ed@80386.nl>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'sessreg.h')
-rw-r--r-- | sessreg.h | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -67,19 +67,12 @@ # include <sys/param.h> #endif -#ifndef HAVE_LASTLOG_H -# define NO_LASTLOG -#endif - -#ifndef NO_LASTLOG -# ifdef CSRG_BASED -# if (BSD < 199103) -# include <lastlog.h> -# endif -# else -# include <lastlog.h> +#if defined(HAVE_STRUCT_LASTLOG) && defined(HAVE_PWD_H) +# ifdef HAVE_LASTLOG_H +# include <lastlog.h> # endif -# include <pwd.h> +# include <pwd.h> +# define USE_LASTLOG #endif #ifdef CSRG_BASED |