]> git.ipfire.org Git - thirdparty/systemd.git/blame - klibc_fixups.h
[PATCH] remove compiler warning from udevd.c
[thirdparty/systemd.git] / klibc_fixups.h
CommitLineData
2023350e
GKH
1#ifdef __KLIBC__
2
3#ifndef KLIBC_FIXUPS_H
534c853d 4#define KLIBC_FIXUPS_H
2023350e 5
e5a2989e
KS
6#include <linux/kernel.h>
7#include <linux/unistd.h>
8
9int sysinfo(struct sysinfo *info);
10
2023350e
GKH
11struct passwd {
12 char *pw_name; /* user name */
13 char *pw_passwd; /* user password */
14 uid_t pw_uid; /* user id */
15 gid_t pw_gid; /* group id */
16 char *pw_gecos; /* real name */
17 char *pw_dir; /* home directory */
18 char *pw_shell; /* shell program */
19};
20
82962619
KS
21struct group {
22 char *gr_name; /* group name */
23 char *gr_passwd; /* group password */
24 gid_t gr_gid; /* group id */
25 char **gr_mem; /* group members */
26};
2023350e 27
82962619
KS
28struct passwd *getpwnam(const char *name);
29struct group *getgrnam(const char *name);
2023350e 30
2023350e 31
534c853d
KS
32#define UT_LINESIZE 32
33#define UT_NAMESIZE 32
34#define UT_HOSTSIZE 256
35#define USER_PROCESS 7 /* normal process */
36#define ut_time ut_tv.tv_sec
37
38
39extern int ufd;
40
41struct exit_status {
42 short int e_termination; /* process termination status */
43 short int e_exit; /* process exit status */
44};
45
46struct utmp
47{
48 short int ut_type; /* type of login */
49 pid_t ut_pid; /* pid of login process */
50 char ut_line[UT_LINESIZE]; /* devicename */
51 char ut_id[4]; /* Inittab id */
52 char ut_user[UT_NAMESIZE]; /* username */
53 char ut_host[UT_HOSTSIZE]; /* hostname for remote login */
54 struct exit_status ut_exit; /* exit status of a process marked as DEAD_PROCESS */
55 /* The ut_session and ut_tv fields must be the same size for 32 and 64-bit */
56#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
57 int32_t ut_session; /* sid used for windowing */
58 struct {
59 int32_t tv_sec; /* seconds */
60 int32_t tv_usec; /* microseconds */
61 } ut_tv;
62#else
63 long int ut_session;
64 struct timeval ut_tv;
2023350e 65#endif
534c853d
KS
66 int32_t ut_addr_v6[4]; /* internet address of remote host */
67 char __unused[20]; /* reserved for future use */
68};
69
70struct utmp *getutent(void);
71void setutent(void);
72void endutent(void);
73
74
75#endif /* KLIBC_FIXUPS_H */
76#endif /* __KLIBC__ */