diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-07 23:43:43 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-07 23:43:43 +0000 |
commit | 09c0a749a126180a3f64db2171355731fd40a29f (patch) | |
tree | fd03feea3203dd40609274a170f9a2076d535a65 | |
parent | c8fa04f9b16f429b76e58b7cd410b5d92db42bb5 (diff) | |
download | busybox-w32-09c0a749a126180a3f64db2171355731fd40a29f.tar.gz busybox-w32-09c0a749a126180a3f64db2171355731fd40a29f.tar.bz2 busybox-w32-09c0a749a126180a3f64db2171355731fd40a29f.zip |
define CLOCK_MONOTONIC to 1 if it is not defined
-rw-r--r-- | libbb/time.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/time.c b/libbb/time.c index 3aa0ee318..07c009417 100644 --- a/libbb/time.c +++ b/libbb/time.c | |||
@@ -12,6 +12,12 @@ | |||
12 | #if ENABLE_MONOTONIC_SYSCALL | 12 | #if ENABLE_MONOTONIC_SYSCALL |
13 | #include <sys/syscall.h> | 13 | #include <sys/syscall.h> |
14 | 14 | ||
15 | /* Old glibc (< 2.3.4) does not provide this constant. We use syscall | ||
16 | * directly so this definition is safe. */ | ||
17 | #ifndef CLOCK_MONOTONIC | ||
18 | #define CLOCK_MONOTONIC 1 | ||
19 | #endif | ||
20 | |||
15 | /* libc has incredibly messy way of doing this, | 21 | /* libc has incredibly messy way of doing this, |
16 | * typically requiring -lrt. We just skip all this mess */ | 22 | * typically requiring -lrt. We just skip all this mess */ |
17 | unsigned long long monotonic_us(void) | 23 | unsigned long long monotonic_us(void) |