diff options
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/time/time.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 5bda87039..69e688b40 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -126,6 +126,8 @@ * list. * * Fix a dst-related bug which resulted in use of uninitialized data. + * + * Nov 15, 2003 I forgot to update the thread locking in the last dst fix. */ #define _GNU_SOURCE @@ -2100,6 +2102,8 @@ time_t _time_mktime(struct tm *timeptr, int store_on_success) register const unsigned char *s; int d, default_dst; + TZLOCK; + tzset(); memcpy(p, timeptr, sizeof(struct tm)); @@ -2135,8 +2139,6 @@ time_t _time_mktime(struct tm *timeptr, int store_on_success) --d; } - TZLOCK; - #ifdef __BCC__ d = p[5] - 1; days = -719163L + ((long)d)*365 + ((d/4) - (d/100) + (d/400) + p[3] + p[7]); |