From ff76966a1c955f4b56737ca11e371c5a230a817c Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Thu, 5 Dec 2013 21:21:45 +0000 Subject: [PATCH] uuid: use CLOCK_REALTIME if CLOCK_MONOTONIC not available Older versions of glibc may not have CLOCK_MONOTONIC, this is certainly the case for the 2.3.2 based terastation libc. Signed-off-by: Spencer Oliver --- uuid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uuid.c b/uuid.c index 92f26eb..82c0d0b 100644 --- a/uuid.c +++ b/uuid.c @@ -47,6 +47,10 @@ static uint32_t clock_seq; static const uint32_t clock_seq_max = 0x3fff; /* 14 bits */ static int clock_seq_initialized; +#ifndef CLOCK_MONOTONIC +#define CLOCK_MONOTONIC CLOCK_REALTIME +#endif + unsigned long long monotonic_us(void) {