curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

RE: Crosscompile with Dockcross

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 24 Mar 2022 23:08:08 +0100 (CET)

On Thu, 24 Mar 2022, Robb Schiefer via curl-library wrote:

> Added the following to my CMakeLists file and the error is gone:
>
> set(HAVE_STRUCT_TIMEVAL 1)
>
> Is this correct? Obviously I would add this conditionally based on the
> target architecture.

There's a check in CMake/OtherTests.cmake that is supposed to check for and
set that variable. It looks like this:

check_c_source_compiles("${_source_epilogue}
int main(void) {
   struct timeval ts;
   ts.tv_sec = 0;
   ts.tv_usec = 0;
   (void)ts;
   return 0;
}" HAVE_STRUCT_TIMEVAL)

https://github.com/curl/curl/blob/f718a915477aed881808244b9f2ad82cee3812f9/CMake/OtherTests.cmake#L213-L220

Obviously that doesn't work as intended.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-03-24