From: Kevin Adler Date: Mon, 24 Jan 2022 22:50:36 +0000 (-0600) Subject: gskit: Fix errors from Curl_strerror refactor X-Git-Tag: curl-7_82_0~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9234547c3428578b79ce6c02ecb6a7c22bc041c9;p=thirdparty%2Fcurl.git gskit: Fix errors from Curl_strerror refactor 2f0bb864c1 replaced sterror with Curl_strerror, but the strerror buffer shadows the set_buffer "buffer" parameter. To keep consistency with the other functions that use Curl_strerror, rename the parameter. In addition, strerror.h is needed for the definition of STRERROR_LEN. Closes #8454 --- diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c index 223ca61101..996df5665a 100644 --- a/lib/vtls/gskit.c +++ b/lib/vtls/gskit.c @@ -28,6 +28,7 @@ #include #undef HAVE_SOCKETPAIR /* because the native one isn't good enough */ #include "socketpair.h" +#include "strerror.h" /* Some symbols are undefined/unsupported on OS400 versions < V7R1. */ #ifndef GSK_SSL_EXTN_SERVERNAME_REQUEST @@ -247,10 +248,10 @@ static CURLcode set_enum(struct Curl_easy *data, gsk_handle h, static CURLcode set_buffer(struct Curl_easy *data, gsk_handle h, - GSK_BUF_ID id, const char *buffer, bool unsupported_ok) + GSK_BUF_ID id, const char *buf, bool unsupported_ok) { char buffer[STRERROR_LEN]; - int rc = gsk_attribute_set_buffer(h, id, buffer, 0); + int rc = gsk_attribute_set_buffer(h, id, buf, 0); switch(rc) { case GSK_OK: