From 7578172516a84e62aed8243b294a424a563b0a71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20Salvet?= Date: Tue, 24 Jan 2006 09:52:56 +0000 Subject: [PATCH] Correct thread-unsafe use of gmtime(). --- org.glite.lb.common/src/ulm_parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.glite.lb.common/src/ulm_parse.c b/org.glite.lb.common/src/ulm_parse.c index 2525a3e..855c26b 100644 --- a/org.glite.lb.common/src/ulm_parse.c +++ b/org.glite.lb.common/src/ulm_parse.c @@ -384,13 +384,14 @@ void edg_wll_ULMSplitDate( const char *s, int edg_wll_ULMTimevalToDate( long sec, long usec, char *dstr ) { char *func = "edg_wll_ULMTimevalToDate"; + struct tm tms; struct tm *tp; int len; if ( sec < 0 || usec < 0 || usec > 999999 ) return 1; - tp = gmtime( (const time_t *) &sec ); + tp = gmtime_r( (const time_t *) &sec, &tms ); if ( tp == NULL ) return 1; -- 1.8.2.3