aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2022-04-16 14:55:02 -0700
committerGarrett D'Amore <garrett@damore.org>2022-04-18 17:37:49 -0400
commitd9897897fcf9d1276190b5d20955c72fd632acac (patch)
treed2b2ffbf198c68e6f1742a27e26d1e80e77522cc
parent60bf092d3e6e68d0af55c78b679310b1687016e8 (diff)
downloadnng-d9897897fcf9d1276190b5d20955c72fd632acac.tar.gz
nng-d9897897fcf9d1276190b5d20955c72fd632acac.tar.bz2
nng-d9897897fcf9d1276190b5d20955c72fd632acac.zip
fixes #1576 Fallback not used when clock_gettime is unavailable (crash on OSX < 10.12)
-rw-r--r--src/platform/posix/posix_clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/posix/posix_clock.c b/src/platform/posix/posix_clock.c
index d5435009..0db447e9 100644
--- a/src/platform/posix/posix_clock.c
+++ b/src/platform/posix/posix_clock.c
@@ -1,5 +1,5 @@
//
-// Copyright 2021 Garrett D'Amore <garrett@damore.org>
+// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2017 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -17,7 +17,7 @@
#include <string.h>
#include <time.h>
-#ifndef NNG_USE_GETTIMEOFDAY
+#if defined(NNG_HAVE_CLOCK_GETTIME) && !defined(NNG_USE_GETTIMEOFDAY)
// Use POSIX realtime stuff
nni_time