summaryrefslogtreecommitdiff
path: root/sessreg.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-11-14 15:22:25 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-11-14 15:22:25 -0800
commit53ad5afe30a75c27604648912c57e5beeb77cca7 (patch)
tree1f00098b6dfc80c24ff47deb75ca080ffd88ac17 /sessreg.h
parent8fb21bdf15185e18e44b5dab6740720a50b9f0c9 (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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sessreg.h b/sessreg.h
index 947f49f..0f6101a 100644
--- a/sessreg.h
+++ b/sessreg.h
@@ -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