Hi,

I got following compilation error in 7.75 release.
It was OK in curl 7.74.
The attached patch fixes the compilation problem in my case.

http.c:1963:10: error: conflicting types for ‘Curl_add_timecondition’
 1963 | CURLcode Curl_add_timecondition(const struct connectdata *conn,
      |          ^~~~~~~~~~~~~~~~~~~~~~
In file included from urldata.h:136,
                 from http.c:52:
http.h:67:10: note: previous declaration of ‘Curl_add_timecondition’ was here
   67 | CURLcode Curl_add_timecondition(struct Curl_easy *data,
      |          ^~~~~~~~~~~~~~~~~~~~~~
http.c: In function ‘Curl_http’:
http.c:3167:37: warning: passing argument 1 of ‘Curl_add_timecondition’ from 
incompatible pointer type [-Wincompatible-pointer-types]
 3167 |     result = Curl_add_timecondition(data, &req);
      |                                     ^~~~
      |                                     |
      |                                     struct Curl_easy *
http.c:1963:59: note: expected ‘const struct connectdata *’ but argument is of 
type ‘struct Curl_easy *’
 1963 | CURLcode Curl_add_timecondition(const struct connectdata *conn,
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~

-- 
--- a/lib/http.c
+++ b/lib/http.c
@@ -1960,10 +1960,10 @@
 }
 #else
 /* disabled */
-CURLcode Curl_add_timecondition(const struct connectdata *conn,
+CURLcode Curl_add_timecondition(struct Curl_easy *data,
                                 struct dynbuf *req)
 {
-  (void)conn;
+  (void)data;
   (void)req;
   return CURLE_OK;
 }
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to