]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: fix `HAVE_TIME_T_UNSIGNED` check
authorBenoit Pierre <benoit.pierre@gmail.com>
Sun, 10 Sep 2023 04:26:14 +0000 (06:26 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 10 Sep 2023 10:21:17 +0000 (12:21 +0200)
The syntax was incorrect (need a proper main body), and the test
condition was wrong (resulting in a signed `time_t` detected as
unsigned).

Closes #11825

configure.ac

index 5c57b41d0b326fe92176293757170def557b84cf..15fbda12adc85ce15ad285331d1947eb15e3df9d 100644 (file)
@@ -3569,8 +3569,10 @@ CURL_RUN_IFELSE(
   [
   #include <time.h>
   #include <limits.h>
-  time_t t = -1;
-  return (t > 0);
+  int main(void) {
+    time_t t = -1;
+    return (t < 0);
+  }
   ],[
   AC_MSG_RESULT([yes])
   AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])