X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ftime%2F__tz.c;h=185642e8828bd00a24b622043f1e5117cb5eb94d;hb=37cd1676395e5ebdae3f372bf59d4fef54be9818;hp=6f5257fe36b7ae5652a0e148d955a2e2bc1fb3b4;hpb=3fe595de83e398dbc3cdbe303cacaf8485c9ae08;p=musl diff --git a/src/time/__tz.c b/src/time/__tz.c index 6f5257fe..185642e8 100644 --- a/src/time/__tz.c +++ b/src/time/__tz.c @@ -5,6 +5,7 @@ #include #include #include "libc.h" +#include "lock.h" long __timezone = 0; int __daylight = 0; @@ -129,6 +130,8 @@ static void do_tzset() if (old_tz && !strcmp(s, old_tz)) return; + for (i=0; i<5; i++) r0[i] = r1[i] = 0; + if (zi) __munmap((void *)zi, map_size); /* Cache the old value of TZ to check if it has changed. Avoid @@ -193,7 +196,6 @@ static void do_tzset() const unsigned char *p; __tzname[0] = __tzname[1] = 0; __daylight = __timezone = dst_off = 0; - for (i=0; i<5; i++) r0[i] = r1[i] = 0; for (p=types; p