]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: add check for suseconds_t
authorDaniel Stenberg <daniel@haxx.se>
Thu, 28 Sep 2023 16:29:42 +0000 (18:29 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 28 Sep 2023 20:56:24 +0000 (22:56 +0200)
And fix the HAVE_LONGLONG define

Ref: #11964
Closes #11977

CMakeLists.txt
lib/curl_config.h.cmake

index 7a4c0d525db4438d8b3cefc045b532d104868e75..2ba52a040ea097459a3fb8150234215a88db92e1 100644 (file)
@@ -1071,6 +1071,7 @@ check_type_size("long"  SIZEOF_LONG)
 check_type_size("int"  SIZEOF_INT)
 check_type_size("__int64"  SIZEOF___INT64)
 check_type_size("time_t"  SIZEOF_TIME_T)
+check_type_size("suseconds_t"  SIZEOF_SUSECONDS_T)
 if(NOT HAVE_SIZEOF_SSIZE_T)
   if(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
     set(ssize_t long)
@@ -1081,9 +1082,12 @@ if(NOT HAVE_SIZEOF_SSIZE_T)
 endif()
 # off_t is sized later, after the HAVE_FILE_OFFSET_BITS test
 
-if(HAVE_SIZEOF_LONG_LONG)
+if(SIZEOF_LONG_LONG)
   set(HAVE_LONGLONG 1)
 endif()
+if(SIZEOF_SUSECONDS_T)
+  set(HAVE_SUSECONDS_T 1)
+endif()
 
 if(NOT CMAKE_CROSSCOMPILING)
   find_file(RANDOM_FILE urandom /dev)
index e0c32e0ccba4c160e130937133d4ee41de26753f..528cad4eff8537f68ea5763cb6e711586d51023a 100644 (file)
 /* Define to 1 if the compiler supports the 'long long' data type. */
 #cmakedefine HAVE_LONGLONG 1
 
+/* Define to 1 if you have the 'suseconds_t' data type. */
+#cmakedefine HAVE_SUSECONDS_T 1
+
 /* Define to 1 if you have the MSG_NOSIGNAL flag. */
 #cmakedefine HAVE_MSG_NOSIGNAL 1