|
Lines 11-17
Link Here
|
| 11 |
#include <sys/stat.h> |
11 |
#include <sys/stat.h> |
| 12 |
#include <sys/sysmacros.h> |
12 |
#include <sys/sysmacros.h> |
| 13 |
#include <utmp.h> |
13 |
#include <utmp.h> |
|
|
14 |
#ifndef __UCLIBC__ |
| 14 |
#include <utmpx.h> |
15 |
#include <utmpx.h> |
|
|
16 |
#endif |
| 15 |
#include <unistd.h> |
17 |
#include <unistd.h> |
| 16 |
|
18 |
|
| 17 |
static void usage(void) { |
19 |
static void usage(void) { |
|
Lines 82-88
Link Here
|
| 82 |
} |
84 |
} |
| 83 |
|
85 |
|
| 84 |
int main(int argc, const char ** argv) { |
86 |
int main(int argc, const char ** argv) { |
|
|
87 |
#ifndef __UCLIBC__ |
| 85 |
struct utmpx utx; |
88 |
struct utmpx utx; |
|
|
89 |
#else |
| 90 |
struct utmp utx; |
| 91 |
#endif |
| 86 |
int add; |
92 |
int add; |
| 87 |
const char * device, * host; |
93 |
const char * device, * host; |
| 88 |
struct passwd * pw; |
94 |
struct passwd * pw; |
|
Lines 154-161
Link Here
|
| 154 |
|
160 |
|
| 155 |
gettimeofday(&utx.ut_tv, NULL); |
161 |
gettimeofday(&utx.ut_tv, NULL); |
| 156 |
|
162 |
|
|
|
163 |
#ifndef __UCLIBC__ |
| 157 |
pututxline(&utx); |
164 |
pututxline(&utx); |
| 158 |
updwtmpx(_PATH_WTMP, &utx); |
165 |
updwtmpx(_PATH_WTMP, &utx); |
|
|
166 |
#else |
| 167 |
pututline(&utx); |
| 168 |
updwtmp(_PATH_WTMP, &utx); |
| 169 |
#endif |
| 159 |
|
170 |
|
| 160 |
return 0; |
171 |
return 0; |
| 161 |
} |
172 |
} |