From 53ad5afe30a75c27604648912c57e5beeb77cca7 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 14 Nov 2014 15:22:25 -0800 Subject: 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 --- sessreg.h | 6 ++++-- 1 file 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 /* Prefer POSIX standard utmpx interfaces if present, otherwise use utmp */ -#if defined(HAVE_UTMP_H) && !defined(HAVE_UTMPX_H) +#ifdef HAVE_UTMP_H # include -# define USE_UTMP +# ifndef HAVE_UTMPX_H +# define USE_UTMP +# endif #endif #ifdef HAVE_UTMPX_H -- cgit v1.2.3