]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib/sendf.h: forward declare two structs
authorViktor Szakats <commit@vsz.me>
Sat, 29 Nov 2025 15:07:59 +0000 (16:07 +0100)
committerViktor Szakats <commit@vsz.me>
Sat, 29 Nov 2025 18:37:58 +0000 (19:37 +0100)
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

lib/sendf.h

index 6867443901026a893cf2b3f980f85c1f8c4ccb5b..3a6dccba6a3dc3d6f9e7c044ad5729447c8f36ba 100644 (file)
 #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.