diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-11-14 15:22:25 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-11-14 15:22:25 -0800 |
commit | 53ad5afe30a75c27604648912c57e5beeb77cca7 (patch) | |
tree | 1f00098b6dfc80c24ff47deb75ca080ffd88ac17 /sessreg.h | |
parent | 8fb21bdf15185e18e44b5dab6740720a50b9f0c9 (diff) |
Include utmp.h if present, even if we're using utmpx interfaces
For platforms which require type or structure definitions from utmp.h
when using lastlog or utmpx/wtmpx interfaces.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'sessreg.h')
-rw-r--r-- | sessreg.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -54,9 +54,11 @@ #include <time.h> /* Prefer POSIX standard utmpx interfaces if present, otherwise use utmp */ -#if defined(HAVE_UTMP_H) && !defined(HAVE_UTMPX_H) +#ifdef HAVE_UTMP_H # include <utmp.h> -# define USE_UTMP +# ifndef HAVE_UTMPX_H +# define USE_UTMP +# endif #endif #ifdef HAVE_UTMPX_H |