diff options
Diffstat (limited to 'uptime.c')
-rw-r--r-- | uptime.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -31,13 +31,14 @@ | |||
31 | #include "internal.h" | 31 | #include "internal.h" |
32 | #include <stdio.h> | 32 | #include <stdio.h> |
33 | #include <time.h> | 33 | #include <time.h> |
34 | #include <sys/sysinfo.h> | 34 | #include <errno.h> |
35 | 35 | ||
36 | #define FSHIFT 16 /* nr of bits of precision */ | 36 | #define FSHIFT 16 /* nr of bits of precision */ |
37 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | 37 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ |
38 | #define LOAD_INT(x) ((x) >> FSHIFT) | 38 | #define LOAD_INT(x) ((x) >> FSHIFT) |
39 | #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) | 39 | #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) |
40 | 40 | ||
41 | |||
41 | extern int uptime_main(int argc, char **argv) | 42 | extern int uptime_main(int argc, char **argv) |
42 | { | 43 | { |
43 | int updays, uphours, upminutes; | 44 | int updays, uphours, upminutes; |