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.
This commit is contained in:
Ed Schouten 2010-01-11 16:27:56 +00:00
parent ac24a8ea24
commit 7845988449
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202086
3 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -39,11 +39,12 @@ License Agreement applies to this software.
#include <sys/param.h>
#include <unistd.h>
#include <utmp.h>
#if DOUTMPX
#include <utmpx.h>
#define utmp utmpx
#define endutent endutxent
#else
#include <utmp.h>
#endif /* DOUTMPX */
#if HAVE_SYS_UTSNAME_H

View File

@ -21,13 +21,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 pututline(x) pututxline(x)
#define endutent endutxent
#define utmp utmpx
#else
#include <utmp.h>
#endif /* DOUTMPX */
#if HAVE_STRING_H