Add missing header and move variable so that they're usable from the
x86-only fallback code. This undoes part of
https://github.com/Hamlib/Hamlib/commit/d20a2358606bec98e232be0a7dbbfacafe98b2ab

Tweak #ifdef check to use the default code path on Unix/Linux. We don't
implement all the features specified by _POSIX_TIMERS, but we do
implement clock_gettime(CLOCK_MONOTONIC) as required by POSIX 2008.


Index: lib/precise_time.c
--- lib/precise_time.c.orig
+++ lib/precise_time.c
@@ -22,6 +22,7 @@
 
 #include <errno.h>
 #include <time.h>
+#include <stdbool.h>
 #include <sys/time.h>
 
 #if 0
@@ -46,13 +47,14 @@ double monotonic_seconds()
 #define NANOS_PER_SECF 1000000000.0
 #define USECS_PER_SEC 1000000
 
+static int showme = 0;
 
-#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
-// If we have it, use clock_gettime and CLOCK_MONOTONIC.
+#if (_POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)) || _POSIX_VERSION >= 200809L
+// If we have it, use clock_gettime and CLOCK_MONOTONIC. clock_gettime
+// with mandatory support for CLOCK_MONOTONIC has been moved to Base
+// with POSIX Issue 7
 
 #include <time.h>
-
-static int showme = 0;
 
 double monotonic_seconds()
 {
