]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
configure: fix detection of timepps.h on NetBSD
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 30 Aug 2018 09:43:53 +0000 (11:43 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 30 Aug 2018 09:56:13 +0000 (11:56 +0200)
The header requires <time.h> for struct timespec.

configure

index fbb5d0abadec7821a63558cedf9d64cfb904a63e..33aacdfad5e93131361aa21ff7db9fc7e79ccea1 100755 (executable)
--- a/configure
+++ b/configure
@@ -707,11 +707,11 @@ fi
 
 timepps_h=""
 if [ $feat_refclock = "1" ] && [ $feat_pps = "1" ]; then
-  if test_code '<sys/timepps.h>' 'inttypes.h sys/timepps.h' '' '' ''; then
+  if test_code '<sys/timepps.h>' 'inttypes.h time.h sys/timepps.h' '' '' ''; then
     timepps_h="sys/timepps.h"
     add_def HAVE_SYS_TIMEPPS_H
   else
-    if test_code '<timepps.h>' 'inttypes.h timepps.h' '' '' ''; then
+    if test_code '<timepps.h>' 'inttypes.h time.h timepps.h' '' '' ''; then
       timepps_h="timepps.h"
       add_def HAVE_TIMEPPS_H
     fi
@@ -719,7 +719,7 @@ if [ $feat_refclock = "1" ] && [ $feat_pps = "1" ]; then
 fi
 
 if [ "x$timepps_h" != "x" ] && \
-  test_code 'PPSAPI' "inttypes.h string.h $timepps_h" '' '' '
+  test_code 'PPSAPI' "inttypes.h string.h time.h $timepps_h" '' '' '
     pps_handle_t h = 0;
     pps_info_t i;
     struct timespec ts;