On OS/2 kLIBC, the first parameter of putenv () is `const char *string' not `char *string'.
* lib/stdlib.in.h (putenv) [kLIBC]: Cast with _GL_CXXALIAS_SYS_CAST(). --- lib/stdlib.in.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index b9838c7d5e..b27d2c08c6 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -1047,6 +1047,10 @@ _GL_CXXALIAS_RPL (putenv, int, (char *string)); # define putenv _putenv # endif _GL_CXXALIAS_MDA (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif @@ -1063,6 +1067,10 @@ _GL_CXXALIASWARN (putenv); /* Need to cast, because on mingw, the parameter is either 'const char *string' or 'char *string'. */ _GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif -- 2.39.1