summaryrefslogtreecommitdiffstats
path: root/contrib/opie/libopie/getutmpentry.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-11 16:27:56 +0000
committered <ed@FreeBSD.org>2010-01-11 16:27:56 +0000
commitcdcbec7f04d8bfca381ec7c6f4ef613661426a89 (patch)
treead6131d0d956eeb6eaf9273f44b28792534ec99d /contrib/opie/libopie/getutmpentry.c
parentcd3015a67bce7ba4abc953858bb8b741950505c6 (diff)
downloadFreeBSD-src-cdcbec7f04d8bfca381ec7c6f4ef613661426a89.zip
FreeBSD-src-cdcbec7f04d8bfca381ec7c6f4ef613661426a89.tar.gz
Don't include <utmp.h> when using <utmpx.h>.
libopie includes both <utmp.h> and <utmpx.h> in this case and uses some #defines to let the code use struct utmpx and its utility functions. We'd better not include <utmp.h> here, because maybe it will not be present in the future.
Diffstat (limited to 'contrib/opie/libopie/getutmpentry.c')
-rw-r--r--contrib/opie/libopie/getutmpentry.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/opie/libopie/getutmpentry.c b/contrib/opie/libopie/getutmpentry.c
index f3afe0c..06d22c8 100644
--- a/contrib/opie/libopie/getutmpentry.c
+++ b/contrib/opie/libopie/getutmpentry.c
@@ -15,13 +15,14 @@ you didn't get a copy, you may request one from <license@inner.net>.
#include "opie_cfg.h"
#include <stdio.h>
#include <sys/types.h>
-#include <utmp.h>
#if DOUTMPX
#include <utmpx.h>
#define setutent setutxent
#define getutline(x) getutxline(x)
#define utmp utmpx
+#else
+#include <utmp.h>
#endif /* DOUTMPX */
#if HAVE_STRING_H
OpenPOWER on IntegriCloud