From: Florian Weimer Date: Tue, 10 May 2016 08:50:24 +0000 (+0200) Subject: resolv: Call gmtime_r instead of gmtime in p_secstodate [BZ #20017] X-Git-Tag: glibc-2.24~275 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4efdc6d956f4ba40f27356e6fc54e40527de63fe;p=glibc.git resolv: Call gmtime_r instead of gmtime in p_secstodate [BZ #20017] --- diff --git a/ChangeLog b/ChangeLog index 7131a286f0..516be8a96c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-05-10 Florian Weimer + + [BZ #20017] + * resolv/res_debug.c (p_secstodate): Call __gmtime_r instead of + gmtime. + 2016-05-10 Florian Weimer [BZ #19994] diff --git a/resolv/res_debug.c b/resolv/res_debug.c index d1e12db579..bd95590ccc 100644 --- a/resolv/res_debug.c +++ b/resolv/res_debug.c @@ -1035,13 +1035,8 @@ p_secstodate (u_long secs) { time_t clock = secs; struct tm *time; -#ifdef HAVE_TIME_R struct tm timebuf; - - time = gmtime_r(&clock, &timebuf); -#else - time = gmtime(&clock); -#endif + time = __gmtime_r(&clock, &timebuf); time->tm_year += 1900; time->tm_mon += 1; sprintf(output, "%04d%02d%02d%02d%02d%02d",