From: Marcel Raad Date: Thu, 27 Apr 2023 16:54:20 +0000 (+0200) Subject: tests/http: make curl_setup.h the first include X-Git-Tag: curl-8_1_0~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da2470de96e94e1c8d276b9ae6e4c97c2cf54239;p=thirdparty%2Fcurl.git tests/http: make curl_setup.h the first include This is required for the macros there to take effect for system libraries. Specifically, including the system libraries first led to warnings about `_FILE_OFFSET_BITS` being redefined in curl_config.h on the Solaris autobuilds for ws-data.c and ws-pingpong.c. Also make the curl includes come first for the other source files here for consistency. Closes https://github.com/curl/curl/pull/11046 --- diff --git a/tests/http/clients/h2-download.c b/tests/http/clients/h2-download.c index d87ee01e1b..dd621d3f4f 100644 --- a/tests/http/clients/h2-download.c +++ b/tests/http/clients/h2-download.c @@ -25,6 +25,11 @@ * HTTP/2 server push * */ + +/* curl stuff */ +#include +#include + #include #include #include @@ -33,10 +38,6 @@ #include #include -/* curl stuff */ -#include -#include - #ifndef CURLPIPE_MULTIPLEX #error "too old libcurl, cannot do HTTP/2 server push!" #endif diff --git a/tests/http/clients/h2-serverpush.c b/tests/http/clients/h2-serverpush.c index 5a1eb3c91c..742a67e596 100644 --- a/tests/http/clients/h2-serverpush.c +++ b/tests/http/clients/h2-serverpush.c @@ -25,6 +25,11 @@ * HTTP/2 server push * */ + +/* curl stuff */ +#include +#include + #include #include #include @@ -33,10 +38,6 @@ #include #include -/* curl stuff */ -#include -#include - #ifndef CURLPIPE_MULTIPLEX #error "too old libcurl, cannot do HTTP/2 server push!" #endif diff --git a/tests/http/clients/ws-data.c b/tests/http/clients/ws-data.c index 93bea4ee75..d055ede3c6 100644 --- a/tests/http/clients/ws-data.c +++ b/tests/http/clients/ws-data.c @@ -25,6 +25,11 @@ * Websockets data echos * */ + +/* curl stuff */ +#include "curl_setup.h" +#include + #include #include #include @@ -33,11 +38,6 @@ #include #include - -/* curl stuff */ -#include -#include "curl_setup.h" - #ifdef USE_WEBSOCKETS static diff --git a/tests/http/clients/ws-pingpong.c b/tests/http/clients/ws-pingpong.c index d8cab976e8..59d4bd1e65 100644 --- a/tests/http/clients/ws-pingpong.c +++ b/tests/http/clients/ws-pingpong.c @@ -25,6 +25,11 @@ * Websockets pingpong * */ + +/* curl stuff */ +#include "curl_setup.h" +#include + #include #include #include @@ -33,11 +38,6 @@ #include #include - -/* curl stuff */ -#include -#include "curl_setup.h" - #ifdef USE_WEBSOCKETS static CURLcode ping(CURL *curl, const char *send_payload)