From 97173b26d27d9f31de1789e994dfe014e3a40162 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 3 Jul 2016 12:59:54 +0200 Subject: mktime: call tzset as per POSIX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Ludovic Courtès in: http://lists.gnu.org/archive/html/bug-gnulib/2016-06/msg00068.html * lib/mktime.c (mktime) [!_LIBC && HAVE_TZSET]: Call tzset. * m4/mktime.m4 (gl_FUNC_MKTIME): Check for tzset. --- lib/mktime.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/mktime.c') diff --git a/lib/mktime.c b/lib/mktime.c index 87ab633a13..9eb3e76524 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -470,6 +470,8 @@ mktime (struct tm *tp) time zone names contained in the external variable 'tzname' shall be set as if the tzset() function had been called. */ __tzset (); +#elif HAVE_TZSET + tzset (); #endif return __mktime_internal (tp, __localtime_r, &localtime_offset); -- cgit v1.2.1