1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

fix netbsd

fix netbsd _again_

fix

fix 2
This commit is contained in:
despair 2018-11-07 18:28:44 -06:00
parent 2a5a0f1577
commit b744af9455

View file

@ -166,9 +166,13 @@ __GetMicroseconds()
#else // !__APPLE__
#if !(defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(CLOCK_MONOTONIC))
// While _POSIX_TIMERS == -1 in openbsd, clock_gettime(2) _does_ support monotonic.
// this is true for all the BSDs
#if !(__OpenBSD__ || __NetBSD__ || __FreeBSD__)
#if !(defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(CLOCK_MONOTONIC))
#warning "Using non-monotonic function gettimeofday() in UTP_GetMicroseconds()"
#endif
#endif
/* Unfortunately, #ifdef CLOCK_MONOTONIC is not enough to make sure that
POSIX clocks work -- we could be running a recent libc with an ancient
@ -179,7 +183,7 @@ __GetMicroseconds()
{
struct timeval tv;
#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(CLOCK_MONOTONIC)
#if defined(CLOCK_MONOTONIC)
static int have_posix_clocks = -1;
int rc;