From bbf03939e49397937cc8b10943c19a3c8ce26b0c Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 7 Jun 2020 19:22:10 +0200
Subject: [PATCH] get_clf_timestamp(): Use privoxy_gmtime_r()

---
 errlog.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/errlog.c b/errlog.c
index 05a2c82e..8b12a436 100644
--- a/errlog.c
+++ b/errlog.c
@@ -533,15 +533,7 @@ static inline size_t get_clf_timestamp(char *buffer, size_t buffer_size)
    int tz_length = 0;
 
    time (&now);
-#ifdef HAVE_GMTIME_R
-   gmt = *gmtime_r(&now, &gmt);
-#elif defined(MUTEX_LOCKS_AVAILABLE)
-   privoxy_mutex_lock(&gmtime_mutex);
-   gmt = *gmtime(&now);
-   privoxy_mutex_unlock(&gmtime_mutex);
-#else
-   gmt = *gmtime(&now);
-#endif
+   gmt = *privoxy_gmtime_r(&now, &gmt);
 #ifdef HAVE_LOCALTIME_R
    tm_now = localtime_r(&now, &dummy);
 #elif defined(MUTEX_LOCKS_AVAILABLE)
-- 
2.49.0