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
This commit is contained in:
Kevin Adler 2022-01-24 16:50:36 -06:00 committed by Daniel Stenberg
parent 897e8baa54
commit 9234547c34
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -28,6 +28,7 @@
#include <qsoasync.h>
#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: