From: Tobias Oetiker Date: Wed, 22 Jul 2015 13:11:30 +0000 (+0200) Subject: make the mutex global X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5afdf1fbd16fadfb7dacf77dfd95c579ea85291;p=thirdparty%2Frrdtool-1.x.git make the mutex global --- 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;