summaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-05-10 10:50:24 +0200
committerFlorian Weimer <fweimer@redhat.com>2016-05-10 10:50:24 +0200
commit4efdc6d956f4ba40f27356e6fc54e40527de63fe (patch)
treef5e864cfb00cc7481a47896cf888059c95153a17 /resolv
parent8db2cf163e048b02cbafe118bf033b78618c2f30 (diff)
downloadglibc-4efdc6d956f4ba40f27356e6fc54e40527de63fe.tar.gz
resolv: Call gmtime_r instead of gmtime in p_secstodate [BZ #20017]
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_debug.c7
1 files changed, 1 insertions, 6 deletions
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",