]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Remove use of TIME_WITH_SYS_TIME.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 13 Nov 2020 06:56:11 +0000 (17:56 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 13 Nov 2020 06:56:11 +0000 (17:56 +1100)
It was only set by the recently removed AC_HEADER_TIME macro, replace
with simple inclusions of both sys/time.h and time.h.  Should prevent
mis-detection of struct timespec.

configure.ac

index 842c255edb55e80851edf1cbe411717dfb6a3095..9bf28ca5812f09ccd6f3e5a249a5854f50aafec2 100644 (file)
@@ -4146,15 +4146,11 @@ fi
 
 AC_CACHE_CHECK([for struct timespec], ac_cv_have_struct_timespec, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-    #ifdef TIME_WITH_SYS_TIME
+    #ifdef HAVE_SYS_TIME_H
     # include <sys/time.h>
+    #endif
+    #ifdef HAVE_TIME_H
     # include <time.h>
-    #else
-    # ifdef HAVE_SYS_TIME_H
-    #  include <sys/time.h>
-    # else
-    #  include <time.h>
-    # endif
     #endif
        ]],
        [[ struct timespec ts; ts.tv_sec = 1;]])],