From e1a822a95f318ca23e41a93d1416322dce439421 Mon Sep 17 00:00:00 2001 From: CodeforEvolution Date: Thu, 18 Jul 2019 15:14:54 -0500 Subject: [PATCH] Conform putenv to POSIX standards Discovered this while working on VLC, checked with other online sources too. Change-Id: I114c20babda0ff0e90d0eeee299d8483700166bd Reviewed-on: https://review.haiku-os.org/c/1628 Reviewed-by: Adrien Destugues --- headers/posix/stdlib.h | 2 +- src/system/libroot/posix/stdlib/env.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/posix/stdlib.h b/headers/posix/stdlib.h index eb1d02398d..d1db4ab5db 100644 --- a/headers/posix/stdlib.h +++ b/headers/posix/stdlib.h @@ -79,7 +79,7 @@ extern long a64l(const char *string); extern char **environ; extern int clearenv(void); extern char *getenv(const char *name); -extern int putenv(const char *string); +extern int putenv(char *string); extern int setenv(char const *name, char const *value, int rewrite); extern int unsetenv(const char *name); diff --git a/src/system/libroot/posix/stdlib/env.cpp b/src/system/libroot/posix/stdlib/env.cpp index e811eeb6f5..bc155f0c55 100644 --- a/src/system/libroot/posix/stdlib/env.cpp +++ b/src/system/libroot/posix/stdlib/env.cpp @@ -304,7 +304,7 @@ unsetenv(const char *name) int -putenv(const char *string) +putenv(char *string) { char *value = strchr(string, '='); status_t status;