summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-08-26 10:28:45 +0000
committerUlrich Drepper <drepper@redhat.com>1996-08-26 10:28:45 +0000
commitdcf0671d905200c449f92ead6cf43c184637a0d5 (patch)
tree91dc217311db41e89545d487b991865a6433205e /resolv
parent4884d0f03c5a3b3d2459655e76fa2d0684d389dc (diff)
downloadglibc-dcf0671d905200c449f92ead6cf43c184637a0d5.tar.gz
glibc-dcf0671d905200c449f92ead6cf43c184637a0d5.tar.xz
glibc-dcf0671d905200c449f92ead6cf43c184637a0d5.zip
handle password file locking. cvs/libc-960826
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_debug.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
index dfb3b4706f..bb314bcaa0 100644
--- a/resolv/res_debug.c
+++ b/resolv/res_debug.c
@@ -1491,13 +1491,13 @@ __p_secstodate (secs)
 {
 	static char output[15];         /* YYYYMMDDHHMMSS and null */
 	time_t clock = secs;
-	struct tm *time;
+	struct tm time;
 
-	time = gmtime(&clock);
-	time->tm_year += 1900;
-	time->tm_mon += 1;
+	__gmtime_r(&clock, &time);
+	time.tm_year += 1900;
+	time.tm_mon += 1;
 	sprintf(output, "%04d%02d%02d%02d%02d%02d",
-		time->tm_year, time->tm_mon, time->tm_mday,
-		time->tm_hour, time->tm_min, time->tm_sec);
+		time.tm_year, time.tm_mon, time.tm_mday,
+		time.tm_hour, time.tm_min, time.tm_sec);
 	return (output);
 }