From 04b9054a04439466a729b59154026274b27ec4d0 Mon Sep 17 00:00:00 2001 From: andrewkirillov-ibm Date: Wed, 13 Nov 2024 14:07:47 +0000 Subject: [PATCH] os400: Fix IBMi builds - 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c index fe2b4589c5..48f7f6d4ae 100644 --- a/packages/OS400/ccsidcurl.c +++ b/packages/OS400/ccsidcurl.c @@ -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: