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 <spen@spen-soft.co.uk>
This commit is contained in:
Spencer Oliver 2013-12-05 21:21:45 +00:00 committed by Justin Maggard
parent b0c1dea56b
commit ff76966a1c

4
uuid.c
View File

@ -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)
{