[Bug/Feature] Make the code compatible with older glib versions.
[Cause] N/A
[Solution] Specific define for older glib versions.
[Verification] Built and run tests.
Change-Id: I65a16393fe3c266ca1b27bea166b1d2b2a41d0be
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
#include "utils/glib-loop.hpp"
#include "utils/callback-wrapper.hpp"
+#include <glib-object.h>
namespace security_containers {
namespace utils {
ScopedGlibLoop::ScopedGlibLoop()
: mLoop(g_main_loop_new(NULL, FALSE), g_main_loop_unref)
{
+#if !GLIB_CHECK_VERSION(2,36,0)
+ g_type_init();
+#endif
mLoopThread = std::thread([this] {
g_main_loop_run(mLoop.get());
});