mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
resolv: Call gmtime_r instead of gmtime in p_secstodate [BZ #20017]
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2016-05-10 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
[BZ #20017]
|
||||||
|
* resolv/res_debug.c (p_secstodate): Call __gmtime_r instead of
|
||||||
|
gmtime.
|
||||||
|
|
||||||
2016-05-10 Florian Weimer <fweimer@redhat.com>
|
2016-05-10 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
[BZ #19994]
|
[BZ #19994]
|
||||||
|
@ -1035,13 +1035,8 @@ p_secstodate (u_long secs) {
|
|||||||
time_t clock = secs;
|
time_t clock = secs;
|
||||||
struct tm *time;
|
struct tm *time;
|
||||||
|
|
||||||
#ifdef HAVE_TIME_R
|
|
||||||
struct tm timebuf;
|
struct tm timebuf;
|
||||||
|
time = __gmtime_r(&clock, &timebuf);
|
||||||
time = gmtime_r(&clock, &timebuf);
|
|
||||||
#else
|
|
||||||
time = gmtime(&clock);
|
|
||||||
#endif
|
|
||||||
time->tm_year += 1900;
|
time->tm_year += 1900;
|
||||||
time->tm_mon += 1;
|
time->tm_mon += 1;
|
||||||
sprintf(output, "%04d%02d%02d%02d%02d%02d",
|
sprintf(output, "%04d%02d%02d%02d%02d%02d",
|
||||||
|
Reference in New Issue
Block a user