X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=cgi.c;h=15ef2562ad5e7c8544af74f6d20c9b7dddf1e5f1;hp=580e2bfb47439907e8665a350087f6fc78890373;hb=e38abca385ad4ac6fcb5b0daf486b72d5e19c012;hpb=bbf03939e49397937cc8b10943c19a3c8ce26b0c diff --git a/cgi.c b/cgi.c index 580e2bfb..15ef2562 100644 --- a/cgi.c +++ b/cgi.c @@ -1515,13 +1515,15 @@ static void get_locale_time(char *buf, size_t buffer_size) #elif defined(MUTEX_LOCKS_AVAILABLE) privoxy_mutex_lock(&localtime_mutex); timeptr = localtime(¤t_time); - privoxy_mutex_unlock(&localtime_mutex); #else timeptr = localtime(¤t_time); #endif strftime(buf, buffer_size, "%a %b %d %X %Z %Y", timeptr); +#if !defined(HAVE_LOCALTIME_R) && defined(MUTEX_LOCKS_AVAILABLE) + privoxy_mutex_unlock(&localtime_mutex); +#endif }