diff options
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/dutmp.c | 9 | ||||
-rw-r--r-- | miscutils/update.c | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c index a75a6e392..26253b445 100644 --- a/miscutils/dutmp.c +++ b/miscutils/dutmp.c | |||
@@ -41,11 +41,9 @@ extern int dutmp_main(int argc, char **argv) | |||
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
44 | /* Kludge around the fact that the binary format for utmp has changed, and the | 44 | /* Kludge around the fact that the binary format for utmp has changed. */ |
45 | * fact the stupid libc doesn't have a reliable #define to announce that libc5 | 45 | #if __GNU_LIBRARY__ < 5 |
46 | * is being used. sigh. | 46 | /* Linux libc5 */ |
47 | */ | ||
48 | #if ! defined __GLIBC__ || defined __UCLIBC__ | ||
49 | while (read(file, (void*)&ut, sizeof(struct utmp))) { | 47 | while (read(file, (void*)&ut, sizeof(struct utmp))) { |
50 | printf("%d|%d|%s|%s|%s|%s|%s|%lx\n", | 48 | printf("%d|%d|%s|%s|%s|%s|%s|%lx\n", |
51 | ut.ut_type, ut.ut_pid, ut.ut_line, | 49 | ut.ut_type, ut.ut_pid, ut.ut_line, |
@@ -54,6 +52,7 @@ extern int dutmp_main(int argc, char **argv) | |||
54 | (long)ut.ut_addr); | 52 | (long)ut.ut_addr); |
55 | } | 53 | } |
56 | #else | 54 | #else |
55 | /* Glibc, uClibc, etc */ | ||
57 | while (read(file, (void*)&ut, sizeof(struct utmp))) { | 56 | while (read(file, (void*)&ut, sizeof(struct utmp))) { |
58 | printf("%d|%d|%s|%s|%s|%s|%d|%d|%ld|%ld|%ld|%x\n", | 57 | printf("%d|%d|%s|%s|%s|%s|%d|%d|%ld|%ld|%ld|%x\n", |
59 | ut.ut_type, ut.ut_pid, ut.ut_line, | 58 | ut.ut_type, ut.ut_pid, ut.ut_line, |
diff --git a/miscutils/update.c b/miscutils/update.c index ce2b6cf08..a6550b05c 100644 --- a/miscutils/update.c +++ b/miscutils/update.c | |||
@@ -33,11 +33,11 @@ | |||
33 | #include <unistd.h> /* for getopt() */ | 33 | #include <unistd.h> /* for getopt() */ |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | 35 | ||
36 | #if defined(__GLIBC__) | 36 | #if __GNU_LIBRARY__ > 5 |
37 | #include <sys/kdaemon.h> | 37 | #include <sys/kdaemon.h> |
38 | #else | 38 | #else |
39 | extern int bdflush (int func, long int data); | 39 | extern int bdflush (int func, long int data); |
40 | #endif /* __GLIBC__ */ | 40 | #endif |
41 | 41 | ||
42 | #include "busybox.h" | 42 | #include "busybox.h" |
43 | 43 | ||