]> git.sesse.net Git - ffmpeg/commitdiff
parseutils: replace setenv() by putenv().
authorNicolas George <nicolas.george@normalesup.org>
Fri, 27 Apr 2012 13:12:52 +0000 (15:12 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Fri, 27 Apr 2012 16:16:04 +0000 (18:16 +0200)
putenv() seems to be more portable.

libavutil/parseutils.c

index 037c4fb9f60c507a1cbdfd0638e21c8d30847ce8..de510caee29b5308cf7eda148b5f380dc44177d4 100644 (file)
@@ -789,6 +789,7 @@ int main(void)
         int64_t tv;
         time_t tvi;
         struct tm *tm;
+        static char tzstr[] = "TZ=CET-1";
         const char *time_string[] = {
             "now",
             "12:35:46",
@@ -804,7 +805,7 @@ int main(void)
         };
 
         av_log_set_level(AV_LOG_DEBUG);
-        setenv("TZ", "CET-1", 1);
+        putenv(tzstr);
         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]);