diff options
author | Eric Andersen | 2001-04-05 03:14:39 +0000 |
---|---|---|
committer | Eric Andersen | 2001-04-05 03:14:39 +0000 |
commit | e76c3b08e105147e3cef7e8d38d65da2fac6b2e1 (patch) | |
tree | 87f705b9e4e4e48700ac61e9538c637ae2b395a7 /miscutils | |
parent | 3c0364f3911ec9f43e1c8c96ec2c8e30b1b52c47 (diff) | |
download | busybox-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.zip busybox-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.tar.gz |
A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
shadowed variables. Move (almost) all syscalls to libbb/syscalls.c, so I can
handle them sanely and all at once.
-Erik
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/adjtimex.c | 9 | ||||
-rw-r--r-- | miscutils/update.c | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 02b6e89..e3c160d 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -44,7 +44,14 @@ #include <sys/types.h> #include <stdlib.h> #include <unistd.h> + +#if __GNU_LIBRARY__ < 5 +#include <sys/timex.h> +extern int adjtimex(struct timex *buf); +#else #include <sys/timex.h> +#endif + #ifdef BB_VER #include "busybox.h" #endif @@ -163,7 +170,7 @@ int main(int argc, char ** argv) " return value: %d (%s)\n", txc.constant, txc.precision, txc.tolerance, txc.tick, - txc.time.tv_sec, txc.time.tv_usec, ret, descript); + (long)txc.time.tv_sec, (long)txc.time.tv_usec, ret, descript); } return (ret<0); } diff --git a/miscutils/update.c b/miscutils/update.c index b282b9e..ce2b6cf 100644 --- a/miscutils/update.c +++ b/miscutils/update.c @@ -33,14 +33,12 @@ #include <unistd.h> /* for getopt() */ #include <stdlib.h> - #if defined(__GLIBC__) #include <sys/kdaemon.h> #else -#include <sys/syscall.h> -#include <linux/unistd.h> -static _syscall2(int, bdflush, int, func, int, data); -#endif /* __GLIBC__ */ +extern int bdflush (int func, long int data); +#endif /* __GLIBC__ */ + #include "busybox.h" static unsigned int sync_duration = 30; |