diff options
-rw-r--r-- | coreutils/hostid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 5c1a4e086..e5b1f5188 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c | |||
@@ -36,7 +36,8 @@ int hostid_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
36 | bb_show_usage(); | 36 | bb_show_usage(); |
37 | } | 37 | } |
38 | 38 | ||
39 | printf("%08lx\n", gethostid()); | 39 | /* POSIX says gethostid returns a "32-bit identifier" */ |
40 | printf("%08x\n", (unsigned)(uint32_t)gethostid()); | ||
40 | 41 | ||
41 | return fflush_all(); | 42 | return fflush_all(); |
42 | } | 43 | } |