mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
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:
parent
ac24a8ea24
commit
7845988449
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202086
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user