Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
uptime: Improve typing and sort headers
[slstatus.git]
/
components
/
entropy.c
diff --git
a/components/entropy.c
b/components/entropy.c
index
606bfec
..
7f6112e
100644
(file)
--- a/
components/entropy.c
+++ b/
components/entropy.c
@@
-1,5
+1,6
@@
/* See LICENSE file for copyright and license details. */
#if defined(__linux__)
/* See LICENSE file for copyright and license details. */
#if defined(__linux__)
+ #include <inttypes.h>
#include <stdio.h>
#include "../util.h"
#include <stdio.h>
#include "../util.h"
@@
-7,14
+8,14
@@
const char *
entropy(void)
{
const char *
entropy(void)
{
-
in
t num;
+
uint64_
t num;
if (pscanf("/proc/sys/kernel/random/entropy_avail",
if (pscanf("/proc/sys/kernel/random/entropy_avail",
- "%
d"
, &num) != 1) {
+ "%
" PRIu64
, &num) != 1) {
return NULL;
}
return NULL;
}
- return bprintf("%
d"
, num);
+ return bprintf("%
" PRIu64
, num);
}
#elif defined(__OpenBSD__)
const char *
}
#elif defined(__OpenBSD__)
const char *