X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fcompat%2Futc-internal.h;h=db3035a3ad6ec51b65270e2cbb49c062910e1d1c;hb=fbb2f0dae77483dd0c13cf90aa346d2010ffbe9a;hp=d78a1885203764f9830dca11b98eccbfb5d0a173;hpb=582e61bbfac98f105483b24e4454e22f26700bed;p=babeltrace.git diff --git a/include/babeltrace/compat/utc-internal.h b/include/babeltrace/compat/utc-internal.h index d78a1885..db3035a3 100644 --- a/include/babeltrace/compat/utc-internal.h +++ b/include/babeltrace/compat/utc-internal.h @@ -46,6 +46,7 @@ time_t bt_timegm(struct tm *tm) #include #include +#include /* * Note: Below implementation of timegm() is not thread safe @@ -76,11 +77,11 @@ time_t bt_timegm(struct tm *tm) } /* Temporarily setting TZ to 1 for UTC */ - setenv("TZ", "", 1); + g_setenv("TZ", "", 1); tzset(); ret = mktime(tm); if (tz) { - setenv("TZ", tz, 1); + g_setenv("TZ", tz, 1); free(tz); } else { unsetenv("TZ");