diff options
| author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-04-09 23:52:18 +0000 |
|---|---|---|
| committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-04-09 23:52:18 +0000 |
| commit | 706cd0a9b3bb15cf437ca22b400a333877af0e37 (patch) | |
| tree | e04e4a2329b9cf5c96b31fa064e6c85dfb8b9055 /miscutils | |
| parent | 5326414f31625194b265c0dfb8f45e932d52c482 (diff) | |
| download | busybox-w32-706cd0a9b3bb15cf437ca22b400a333877af0e37.tar.gz busybox-w32-706cd0a9b3bb15cf437ca22b400a333877af0e37.tar.bz2 busybox-w32-706cd0a9b3bb15cf437ca22b400a333877af0e37.zip | |
Update how we detect if libc5 is in use.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@2292 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 | ||
