]> git.gsnw.org Git - fping.git/commitdiff
Fixed wrong timestamp under Free- and OpenBSD and macOS
authorGerman Service Network <support@gsnw.de>
Fri, 12 Mar 2021 21:27:59 +0000 (22:27 +0100)
committerGerman Service Network <support@gsnw.de>
Thu, 30 Dec 2021 16:57:01 +0000 (17:57 +0100)
src/fping.c

index dafbeb5bf2215ad3c96882554eab006547daa8b5..44831deb85433344a884e17e221204e40b20c0d9 100644 (file)
@@ -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