From e5afdf1fbd16fadfb7dacf77dfd95c579ea85291 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Wed, 22 Jul 2015 15:11:30 +0200 Subject: [PATCH] make the mutex global --- src/rrd_parsetime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rrd_parsetime.c b/src/rrd_parsetime.c index 9162884f..24d4b6a4 100644 --- a/src/rrd_parsetime.c +++ b/src/rrd_parsetime.c @@ -833,11 +833,13 @@ static char *day( * mktime() The return value is either TIME_OK (aka NULL) or * the pointer to the error message in the case of problems */ + +static mutex_t parsetime_mutex = MUTEX_INITIALIZER; + char *rrd_parsetime( const char *tspec, rrd_time_value_t * ptv) { - static mutex_t parsetime_mutex = MUTEX_INITIALIZER; time_t now = time(NULL); int hr = 0; -- 2.47.2