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:
parent
b0c1dea56b
commit
ff76966a1c
4
uuid.c
4
uuid.c
@ -47,6 +47,10 @@ static uint32_t clock_seq;
|
|||||||
static const uint32_t clock_seq_max = 0x3fff; /* 14 bits */
|
static const uint32_t clock_seq_max = 0x3fff; /* 14 bits */
|
||||||
static int clock_seq_initialized;
|
static int clock_seq_initialized;
|
||||||
|
|
||||||
|
#ifndef CLOCK_MONOTONIC
|
||||||
|
#define CLOCK_MONOTONIC CLOCK_REALTIME
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned long long
|
unsigned long long
|
||||||
monotonic_us(void)
|
monotonic_us(void)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user