]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
os400: Fix IBMi builds
authorandrewkirillov-ibm <akirillo@uk.ibm.com>
Wed, 13 Nov 2024 14:07:47 +0000 (14:07 +0000)
committerJay Satiro <raysatiro@yahoo.com>
Thu, 14 Nov 2024 00:15:15 +0000 (19:15 -0500)
- Use a separate variable for CURL type dereference.

Prior to this change, eed3c8f4 (precedes 8.11.0), changed CURL type from
Curl_easy to void which broke dereferences to the former.

Reported-by: Andrew Kirillov
Fixes https://github.com/curl/curl/issues/15566
Closes https://github.com/curl/curl/pull/15572

packages/OS400/ccsidcurl.c

index fe2b4589c542a684bdef49f52b9271002a5c9ad3..48f7f6d4aeb1296a49e5e72bf95a73c8bb459c78 100644 (file)
@@ -1072,6 +1072,7 @@ curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...)
   char *cp = NULL;
   unsigned int ccsid;
   curl_off_t pfsize;
+  struct Curl_easy *data = easy;
 
   va_start(arg, tag);
 
@@ -1195,7 +1196,7 @@ curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...)
     s = va_arg(arg, char *);
     ccsid = va_arg(arg, unsigned int);
 
-    pfsize = easy->set.postfieldsize;
+    pfsize = data->set.postfieldsize;
 
     if(!s || !pfsize || ccsid == NOCONV_CCSID || ccsid == ASCII_CCSID) {
       result = curl_easy_setopt(easy, CURLOPT_COPYPOSTFIELDS, s);
@@ -1240,12 +1241,12 @@ curl_easy_setopt_ccsid(CURL *easy, CURLoption tag, ...)
         break;
       }
 
-      easy->set.postfieldsize = pfsize;         /* Replace data size. */
+      data->set.postfieldsize = pfsize;         /* Replace data size. */
       s = cp;
     }
 
     result = curl_easy_setopt(easy, CURLOPT_POSTFIELDS, s);
-    easy->set.str[STRING_COPYPOSTFIELDS] = s;   /* Give to library. */
+    data->set.str[STRING_COPYPOSTFIELDS] = s;   /* Give to library. */
     break;
 
   default: