aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-03-27 11:53:05 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-03-27 11:53:05 +0000
commit1650f051c15f62c12ada20a041927428e00773af (patch)
tree46bf889449ba528b9b14373e12d5a604964c8403 /src/plugins/regexp.c
parentba5e0c97122da57861ffb79dbd44d81bb8e63964 (diff)
downloadrspamd-1650f051c15f62c12ada20a041927428e00773af.tar.gz
rspamd-1650f051c15f62c12ada20a041927428e00773af.zip
Fix CentOS 5 build.
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r--src/plugins/regexp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 9dce07772..272805548 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -1309,9 +1309,13 @@ process_regexp_item (struct worker_task *task, void *user_data)
if (!item->lua_function && regexp_module_ctx->max_threads > 1) {
if (regexp_module_ctx->workers == NULL) {
#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30))
+# if GLIB_MINOR_VERSION > 20
if (! g_thread_get_initialized ()) {
g_thread_init (NULL);
}
+# else
+ g_thread_init (NULL);
+# endif
workers_mtx = g_mutex_new ();
#else
workers_mtx = memory_pool_alloc (regexp_module_ctx->regexp_pool, sizeof (GMutex));