From: Aaron Marcher Date: Fri, 6 Jul 2018 21:26:12 +0000 (+0200) Subject: entropy: Use POSIX types for format specifiers X-Git-Url: https://git.atheridis.org/?a=commitdiff_plain;h=b65c058598afe7319c1a634cd8423ec25d0d7215;p=suckless%2Fslstatus.git entropy: Use POSIX types for format specifiers --- diff --git a/components/entropy.c b/components/entropy.c index 4ca7110..7f6112e 100644 --- a/components/entropy.c +++ b/components/entropy.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #if defined(__linux__) + #include #include - #include #include "../util.h" @@ -11,11 +11,11 @@ uint64_t num; if (pscanf("/proc/sys/kernel/random/entropy_avail", - "%d", &num) != 1) { + "%" PRIu64, &num) != 1) { return NULL; } - return bprintf("%d", num); + return bprintf("%" PRIu64, num); } #elif defined(__OpenBSD__) const char *