TARGET_LINK_LIBRARIES(rspamd-test rspamd_lua)
TARGET_LINK_LIBRARIES(rspamd-test rspamdserver)
TARGET_LINK_LIBRARIES(rspamd-test event)
+TARGET_LINK_LIBRARIES(rspamd-test m)
TARGET_LINK_LIBRARIES(rspamd-test ${GLIB2_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd-test ${CMAKE_REQUIRED_LIBRARIES})
IF(HAVE_LIBEVENT2)
TARGET_LINK_LIBRARIES(rspamd-test "${LUAJIT_LIBRARY}")
ELSE(ENABLE_LUAJIT MATCHES "ON")
TARGET_LINK_LIBRARIES(rspamd-test "${LUA_LIBRARY}")
-ENDIF(ENABLE_LUAJIT MATCHES "ON")
\ No newline at end of file
+ENDIF(ENABLE_LUAJIT MATCHES "ON")
g_test_init (&argc, &argv, NULL);
rspamd_main = (struct rspamd_main *)g_malloc (sizeof (struct rspamd_main));
+
+#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 30))
+ g_thread_init (NULL);
+#endif
+
memset (rspamd_main, 0, sizeof (struct rspamd_main));
rspamd_main->server_pool = memory_pool_new (memory_pool_get_size ());
rspamd_main->cfg = (struct config_file *)g_malloc (sizeof (struct config_file));