]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
curl: Fix issue with printf checks in newer curl versions
authorTobias Brunner <tobias@strongswan.org>
Wed, 10 Jan 2024 10:17:58 +0000 (11:17 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 16 Jan 2024 10:00:29 +0000 (11:00 +0100)
Newer curl versions (as used on macOS via Homebrew) add attributes like

  __attribute__ ((format(printf, a, b)))

to their `curl_*printf*` functions, which fails if we redefine `printf`
as e.g. `builtin_printf` (pulled in via library.h).  We could disable
these checks via CURL_NO_FMT_CHECKS, but reordering the headers should
do the trick as well.

src/libstrongswan/plugins/curl/curl_plugin.c

index d38df80a521ad2602d78e30a0e82dda0dc9356fc..8f3166bcd6022590bd9d60a1dcd2b12e366215eb 100644 (file)
  * for more details.
  */
 
-#include "curl_plugin.h"
+#include <curl/curl.h>
 
 #include <library.h>
 #include <utils/debug.h>
-#include "curl_fetcher.h"
 
-#include <curl/curl.h>
+#include "curl_plugin.h"
+#include "curl_fetcher.h"
 
 typedef struct private_curl_plugin_t private_curl_plugin_t;