diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-04-28 04:18:56 +0400 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-04-28 04:18:56 +0400 |
commit | 4f3f757d56fbf420ea5030dcf7ea971b3da3ab47 (patch) | |
tree | d986e9bb9f03bf1f83465c274c35c0d58ed544e4 /dutmp.c | |
parent | 227a59b05d6df9b4be5990915646249d6f548822 (diff) |
Latest and greatest. Some effort at libc5 (aiming towards newlib)
compatability.
-Erik
Diffstat (limited to 'dutmp.c')
-rw-r--r-- | dutmp.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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); |