#ifndef _COMPAT_UTMPX_H_
#define _COMPAT_UTMPX_H_
#include <compat/sys/time.h>
struct utmpx50 {
char ut_name[_UTX_USERSIZE];
char ut_id[_UTX_IDSIZE];
char ut_line[_UTX_LINESIZE];
char ut_host[_UTX_HOSTSIZE];
uint16_t ut_session;
uint16_t ut_type;
pid_t ut_pid;
struct {
uint16_t e_termination;
uint16_t e_exit;
} ut_exit;
struct sockaddr_storage ut_ss;
struct timeval50 ut_tv;
uint32_t ut_pad[10];
};
struct lastlogx50 {
struct timeval50 ll_tv;
char ll_line[_UTX_LINESIZE];
char ll_host[_UTX_HOSTSIZE];
struct sockaddr_storage ll_ss;
};
__BEGIN_DECLS
static __inline void
utmpx50_to_utmpx(const struct utmpx50 *ut50, struct utmpx *ut)
{
(void)memcpy(ut, ut50, sizeof(*ut));
timeval50_to_timeval(&ut50->ut_tv, &ut->ut_tv);
}
static __inline void
utmpx_to_utmpx50(const struct utmpx *ut, struct utmpx50 *ut50)
{
(void)memcpy(ut50, ut, sizeof(*ut50));
timeval_to_timeval50(&ut->ut_tv, &ut50->ut_tv);
}
struct utmpx50 *getutxent(void);
struct utmpx *__getutxent50(void);
struct utmpx50 *getutxid(const struct utmpx50 *);
struct utmpx *__getutxid50(const struct utmpx *);
struct utmpx50 *getutxline(const struct utmpx50 *);
struct utmpx *__getutxline50(const struct utmpx *);
struct utmpx50 *pututxline(const struct utmpx50 *);
struct utmpx *__pututxline50(const struct utmpx *);
int updwtmpx(const char *, const struct utmpx50 *);
int __updwtmpx50(const char *, const struct utmpx *);
int updlastlogx(const char *, uid_t, struct lastlogx50 *);
int __updlastlogx50(const char *, uid_t, struct lastlogx *);
struct utmp;
void getutmp(const struct utmpx50 *, struct utmp *);
void __getutmp50(const struct utmpx *, struct utmp *);
void getutmpx(const struct utmp *, struct utmpx50 *);
void __getutmpx50(const struct utmp *, struct utmpx *);
int lastlogxname(const char *);
struct lastlogx50 *getlastlogx(uid_t, struct lastlogx50 *);
struct lastlogx50 *__getlastlogx13(const char *, uid_t, struct lastlogx50 *);
struct lastlogx *__getlastlogx50(const char *, uid_t, struct lastlogx *);
__END_DECLS
#endif