--- a/SConstruct
+++ b/SConstruct
@@ -736,7 +736,7 @@ size_t strlcpy(/*@out@*/char *dst, /*@in
 }
 # endif
 #endif
-#ifndef HAVE_CLOCK_GETTIME
+#ifndef _POSIX_TIMERS
 # ifdef __cplusplus
 extern "C" {
 # endif
--- a/gpsd.h-head
+++ b/gpsd.h-head
@@ -14,6 +14,7 @@ extern "C" {
 #include <stdbool.h>
 #include <stdio.h>
 #include <time.h>    /* for time_t */
+#include <unistd.h>  /* for _POSIX_TIMERS */
 
 #ifndef GPSD_CONFIG_H
 /* Feature configuration switches begin here */
