diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-02-17 21:13:59 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-02-17 21:13:59 +0400 |
commit | 5218877e6a4daf614fc765927af8b0cda02bc95f (patch) | |
tree | ab07a15ad453c9ad10a0e39130142f2ccb2ffca4 /src/main.c | |
parent | 000fe3011cdf600fd7c7ccad5488de5d96271322 (diff) | |
download | rspamd-5218877e6a4daf614fc765927af8b0cda02bc95f.tar.gz rspamd-5218877e6a4daf614fc765927af8b0cda02bc95f.zip |
Workaround for old glib.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 502b1f0e1..b55186ce3 100644 --- a/src/main.c +++ b/src/main.c @@ -385,6 +385,9 @@ fork_worker (struct rspamd_main *rspamd, struct worker_conf *cf) /* Do silent log reopen to avoid collisions */ close_log (rspamd->logger); open_log (rspamd->logger); +#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30)) + g_thread_init (NULL); +#endif msg_info ("starting %s process %P", cf->worker->name, getpid ()); cf->worker->worker_start_func (cur); break; @@ -821,6 +824,9 @@ main (gint argc, gchar **argv, gchar **env) #ifdef HAVE_SA_SIGINFO signals_info = g_queue_new (); #endif +#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30)) + g_thread_init (NULL); +#endif rspamd_main = (struct rspamd_main *)g_malloc (sizeof (struct rspamd_main)); memset (rspamd_main, 0, sizeof (struct rspamd_main)); rspamd_main->server_pool = memory_pool_new (memory_pool_get_size ()); |