# HG changeset patch # User Matt Johnston # Date 1518098879 -28800 # Node ID b528e3753af4df94b1c511ae64be268c95904101 # Parent 7279a633cc50e8897d15f54421bc3ebd7eedd6e3 define CLOCK_MONOTONIC if needed diff -r 7279a633cc50 -r b528e3753af4 dbutil.c --- a/dbutil.c Fri Jan 26 00:32:39 2018 +0800 +++ b/dbutil.c Thu Feb 08 22:07:59 2018 +0800 @@ -634,6 +634,10 @@ #ifndef CLOCK_MONOTONIC_COARSE #define CLOCK_MONOTONIC_COARSE 6 #endif +/* Some old toolchains know SYS_clock_gettime but not CLOCK_MONOTONIC */ +#ifndef CLOCK_MONOTONIC +#define CLOCK_MONOTONIC 1 +#endif static clockid_t get_linux_clock_source() { struct timespec ts; if (syscall(SYS_clock_gettime, CLOCK_MONOTONIC_COARSE, &ts) == 0) {