From 08a2f887b26c89cfb1e1b5715a23d561b75e0dab Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Fri, 29 Sep 2017 13:51:59 +0300 Subject: lib: Reduce dependency on glib In commit ebd6eb69f57b ("Make igtrc configuration common, with configurable suspend/resume delay") .igtrc handling was moved to igt_core from igt_chamelium. That made everything in IGT depend on GLIB by accident. In short, igt_core.h declared a variable of type GKeyFile*, requiring glib.h. Everything that tried to #include igt_core.h required glib.h to be available, by use of GLIB_CFLAGS. This "worked" so far because CAIRO_CFLAGS contained GLIB_CFLAGS. As the variable is only used by other stuff in lib/, stuff it in its own header file to leave igt_core.h without a dependency to glib.h. Also add a couple of missing #ifdef HAVE_GLIBs around. Reported-by: Felipe De Jesus Ruiz Garcia Signed-off-by: Petri Latvala Reviewed-by: Arkadiusz Hiler --- lib/igt_core.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/igt_core.c') diff --git a/lib/igt_core.c b/lib/igt_core.c index 47b4682d..950ea9b0 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -55,7 +55,9 @@ #include #include #include +#ifdef HAVE_GLIB #include +#endif #include "drmtest.h" #include "intel_chipset.h" @@ -67,6 +69,7 @@ #include "igt_core.h" #include "igt_aux.h" #include "igt_sysfs.h" +#include "igt_rc.h" #ifdef HAVE_LIBGEN_H #include /* for basename() on Solaris */ -- cgit v1.2.3