From: Viktor Szakats Date: Sat, 29 Nov 2025 15:07:59 +0000 (+0100) Subject: lib/sendf.h: forward declare two structs X-Git-Tag: rc-8_18_0-1~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=545f2f387d41b4a356705a08c1154c807f4dbb7d;p=thirdparty%2Fcurl.git lib/sendf.h: forward declare two structs To fix non-unity builds using certain header orders (seen in ntlm.c with the include order changed): ``` lib/vauth/../sendf.h:117:27: error: ‘struct Curl_cwriter’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 117 | struct Curl_cwriter *writer); | ^~~~~~~~~~~~ lib/vauth/../sendf.h:215:54: error: ‘struct Curl_creader’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 215 | CURLcode (*do_init)(struct Curl_easy *data, struct Curl_creader *reader); | ^~~~~~~~~~~~ [...] ``` Ref: https://github.com/curl/curl/actions/runs/19785420705/job/56691185397?pr=19760 Ref: #19760 Closes #19761 --- diff --git a/lib/sendf.h b/lib/sendf.h index 6867443901..3a6dccba6a 100644 --- a/lib/sendf.h +++ b/lib/sendf.h @@ -52,6 +52,10 @@ #define CLIENTWRITE_EOS (1<<7) /* End Of transfer download Stream */ #define CLIENTWRITE_0LEN (1<<8) /* write even 0-length buffers */ +/* Forward declarations */ +struct Curl_creader; +struct Curl_cwriter; + /** * Write `len` bytes at `prt` to the client. `type` indicates what * kind of data is being written.