From: German Service Network Date: Fri, 12 Mar 2021 21:27:59 +0000 (+0100) Subject: Fixed wrong timestamp under Free- and OpenBSD and macOS X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04af04c839387fa547609ae81dfcc16e88d4bb6b;p=fping.git Fixed wrong timestamp under Free- and OpenBSD and macOS --- diff --git a/src/fping.c b/src/fping.c index dafbeb5..44831de 100644 --- a/src/fping.c +++ b/src/fping.c @@ -122,8 +122,11 @@ extern int h_errno; #define CLOCKID CLOCK_REALTIME #endif +/* CLOCK_MONTONIC starts under macOS, OpenBSD and FreeBSD with undefined positive point and can not be use + * see github PR #217 + */ #if !defined(CLOCKID) -#if defined(CLOCK_MONOTONIC) +#if defined(CLOCK_MONOTONIC) && !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) #define CLOCKID CLOCK_MONOTONIC #else #define CLOCKID CLOCK_REALTIME