X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/951ea4e304cf23f8464a4b6896cfcf4035920249..16e15217c6cb56bd4125c54e645b932a50655b9d:/components/entropy.c diff --git a/components/entropy.c b/components/entropy.c index 606bfec..7f6112e 100644 --- a/components/entropy.c +++ b/components/entropy.c @@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license details. */ #if defined(__linux__) + #include #include #include "../util.h" @@ -7,14 +8,14 @@ const char * entropy(void) { - int num; + 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 *