From: Rich Felker Date: Sat, 24 Aug 2013 17:11:18 +0000 (-0400) Subject: properly fill in tzname[] for old (pre-64-bit-format) zoneinfo files X-Git-Tag: v0.9.13~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=190bbb992344e350925bb9ebc37775ba8cc4c19f;p=oweals%2Fmusl.git properly fill in tzname[] for old (pre-64-bit-format) zoneinfo files in this case, the first standard-time and first daylight-time rules should be taken as the "default" ones to expose. --- diff --git a/src/time/__tz.c b/src/time/__tz.c index 8a1836e7..81676d3b 100644 --- a/src/time/__tz.c +++ b/src/time/__tz.c @@ -190,7 +190,28 @@ static void do_tzset() for (s = (const char *)zi+map_size-2; *s!='\n'; s--); s++; } else { - s = 0; + 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