diff options
author | Erik Andersen | 2000-04-28 00:18:56 +0000 |
---|---|---|
committer | Erik Andersen | 2000-04-28 00:18:56 +0000 |
commit | 4f3f757d56fbf420ea5030dcf7ea971b3da3ab47 (patch) | |
tree | d986e9bb9f03bf1f83465c274c35c0d58ed544e4 /miscutils | |
parent | 227a59b05d6df9b4be5990915646249d6f548822 (diff) | |
download | busybox-4f3f757d56fbf420ea5030dcf7ea971b3da3ab47.zip busybox-4f3f757d56fbf420ea5030dcf7ea971b3da3ab47.tar.gz |
Latest and greatest. Some effort at libc5 (aiming towards newlib)
compatability.
-Erik
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/dutmp.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c index 1629067..886d788 100644 --- a/miscutils/dutmp.c +++ b/miscutils/dutmp.c @@ -14,11 +14,17 @@ #include "internal.h" #include <stdio.h> #include <errno.h> -#include <utmp.h> #define BB_DECLARE_EXTERN #define bb_need_io_error #include "messages.c" +#if defined(__GLIBC__) +#include <utmp.h> +#else +#include <utmp-wrap.h> +#define utmp new_utmp +#endif + static const char dutmp_usage[] = "dutmp [FILE]\n\n" "Dump utmp file format (pipe delimited) from FILE\n" "or stdin to stdout. (i.e. 'dutmp /var/run/utmp')\n"; @@ -45,8 +51,8 @@ extern int dutmp_main(int argc, char **argv) ut.ut_type, ut.ut_pid, ut.ut_line, ut.ut_id, ut.ut_user, ut.ut_host, ut.ut_exit.e_termination, ut.ut_exit.e_exit, - ut.ut_session, - ut.ut_tv.tv_sec, ut.ut_tv.tv_usec, ut.ut_addr); + ut.ut_session, ut.ut_tv.tv_sec, ut.ut_tv.tv_usec, + ut.ut_addr_v6[0]); } exit(TRUE); |