[FFmpeg-devel] [PATCH] parseutils: replace setenv() by putenv().
Nicolas George
nicolas.george at normalesup.org
Fri Apr 27 15:25:10 CEST 2012
putenv() seems to be more portable.
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
libavutil/parseutils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
The cast is necessary to avoid a warning, since putenv's argument is not
const.
diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
index 037c4fb..037811c 100644
--- a/libavutil/parseutils.c
+++ b/libavutil/parseutils.c
@@ -804,7 +804,7 @@ int main(void)
};
av_log_set_level(AV_LOG_DEBUG);
- setenv("TZ", "CET-1", 1);
+ putenv((char *)"TZ=CET-1");
printf("(now is 2012-03-17 09:14:13 +0100, local time is UTC+1)\n");
for (i = 0; i < FF_ARRAY_ELEMS(time_string); i++) {
printf("%-24s -> ", time_string[i]);
--
1.7.2.5
More information about the ffmpeg-devel
mailing list