diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-04-09 23:52:18 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-04-09 23:52:18 +0000 |
commit | b6b519b416189202d18d888d61d8bbe50dc30325 (patch) | |
tree | e04e4a2329b9cf5c96b31fa064e6c85dfb8b9055 /miscutils | |
parent | d3f97f19718fa5890cb6cb3fd010f7b4a7bd3ae1 (diff) |
Update how we detect if libc5 is in use.
-Erik
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) } } -/* Kludge around the fact that the binary format for utmp has changed, and the - * fact the stupid libc doesn't have a reliable #define to announce that libc5 - * is being used. sigh. - */ -#if ! defined __GLIBC__ || defined __UCLIBC__ +/* Kludge around the fact that the binary format for utmp has changed. */ +#if __GNU_LIBRARY__ < 5 + /* Linux libc5 */ while (read(file, (void*)&ut, sizeof(struct utmp))) { printf("%d|%d|%s|%s|%s|%s|%s|%lx\n", ut.ut_type, ut.ut_pid, ut.ut_line, @@ -54,6 +52,7 @@ extern int dutmp_main(int argc, char **argv) (long)ut.ut_addr); } #else + /* Glibc, uClibc, etc */ while (read(file, (void*)&ut, sizeof(struct utmp))) { printf("%d|%d|%s|%s|%s|%s|%d|%d|%ld|%ld|%ld|%x\n", 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 @@ #include <unistd.h> /* for getopt() */ #include <stdlib.h> -#if defined(__GLIBC__) -#include <sys/kdaemon.h> +#if __GNU_LIBRARY__ > 5 + #include <sys/kdaemon.h> #else -extern int bdflush (int func, long int data); -#endif /* __GLIBC__ */ + extern int bdflush (int func, long int data); +#endif #include "busybox.h" |