From cbecb8a20943239fe217ec329f05e8460bfc49e9 Mon Sep 17 00:00:00 2001 From: pwpiwi Date: Thu, 18 Mar 2021 08:25:16 +0100 Subject: [PATCH] gcc10 compiler fixes: - Check for availability of getenv_s() in argtable3.c --- client/cliparser/argtable3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cliparser/argtable3.c b/client/cliparser/argtable3.c index 180ec6c1..dfcc9c19 100644 --- a/client/cliparser/argtable3.c +++ b/client/cliparser/argtable3.c @@ -1705,7 +1705,7 @@ getopt_internal(int nargc, char * const *nargv, const char *options, * string begins with a '+'. */ if (posixly_correct == -1 || optreset) { -#ifdef _WIN32 +#if (defined(__STDC_LIB_EXT1__) && defined(__STDC_WANT_LIB_EXT1__)) || (defined(__STDC_SECURE_LIB__) && defined(__STDC_WANT_SECURE_LIB__)) size_t requiredSize; getenv_s(&requiredSize, NULL, 0, "POSIXLY_CORRECT"); posixly_correct = requiredSize != 0; -- 2.39.5