From 0dc37a62ff21477a025d466868ececdf60791aca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Jacke?= Date: Tue, 14 Sep 2010 14:08:44 +0200 Subject: [PATCH] libreplace: use CLOCK_HIGHRES when available in Solaris 8 CLOCK_HIGHRES was the (only) name for CLOCK_MONOTONIC (cherry picked from commit 9c00fb4aa68ac7b044e954906e5ed20e039373a3) --- lib/replace/system/time.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/replace/system/time.h b/lib/replace/system/time.h index 3605d2692e8..5fce4dbc45b 100644 --- a/lib/replace/system/time.h +++ b/lib/replace/system/time.h @@ -73,10 +73,12 @@ typedef int clockid_t; int rep_clock_gettime(clockid_t clk_id, struct timespec *tp); #endif /* make sure we have a best effort CUSTOM_CLOCK_MONOTONIC we can rely on */ -#ifndef CLOCK_MONOTONIC -#define CUSTOM_CLOCK_MONOTONIC CLOCK_REALTIME -#else +#if defined(CLOCK_MONOTONIC) #define CUSTOM_CLOCK_MONOTONIC CLOCK_MONOTONIC +#elif defined(CLOCK_HIGHRES) +#define CUSTOM_CLOCK_MONOTONIC CLOCK_HIGHRES +#else +#define CUSTOM_CLOCK_MONOTONIC CLOCK_REALTIME #endif #endif -- 2.11.4.GIT