From 9234547c3428578b79ce6c02ecb6a7c22bc041c9 Mon Sep 17 00:00:00 2001 From: Kevin Adler Date: Mon, 24 Jan 2022 16:50:36 -0600 Subject: [PATCH] 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 --- lib/vtls/gskit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: -- 2.47.3