]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
make the mutex global
authorTobias Oetiker <tobi@oetiker.ch>
Wed, 22 Jul 2015 13:11:30 +0000 (15:11 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Wed, 22 Jul 2015 13:11:30 +0000 (15:11 +0200)
src/rrd_parsetime.c

index 9162884fa215dea2aa8bd8623227fa19cae6de4c..24d4b6a440a67fe0a78cfbb2cf9cdffc84911d5d 100644 (file)
@@ -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;