[PATCH i-g-t v11 4/7] runner: Include local glib header for Android
Badrappan, Jeevaka
jeevaka.badrappan at intel.com
Mon Jun 2 18:54:12 UTC 2025
> As glib is not available in Android, added local stub header to build
> igt for Android.
>
> Signed-off-by: Jeevaka Prabu Badrappan <jeevaka.badrappan at intel.com>
> Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> ---
> runner/executor.c | 4 ++++
> runner/settings.h | 4 ++++
> 2 files changed, 8 insertions(+)
> Should you also add some NULL handling there?
For glib stub functions g_key_file_get_string, NULL handling is already in place.
Regards,
Jeevaka
>
> diff --git a/runner/executor.c b/runner/executor.c
> index 41f521e56..784d9eb5f 100644
> --- a/runner/executor.c
> +++ b/runner/executor.c
> @@ -1,7 +1,11 @@
> #include <ctype.h>
> #include <errno.h>
> #include <fcntl.h>
> +#ifdef ANDROID
> +#include "android/glib.h"
> +#else
> #include <glib.h>
> +#endif
> #ifdef __linux__
> #include <linux/watchdog.h>
> #endif
> diff --git a/runner/settings.h b/runner/settings.h
> index 1f0b85318..ccdc7281b 100644
> --- a/runner/settings.h
> +++ b/runner/settings.h
> @@ -5,7 +5,11 @@
> #include <stddef.h>
> #include <sys/types.h>
> #include <stdio.h>
> +#ifdef ANDROID
> +#include "android/glib.h"
> +#else
> #include <glib.h>
> +#endif
>
> #include "igt_list.h"
> #include "igt_vec.h"
> --
> 2.49.0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20250602/5cf865b8/attachment.htm>
More information about the igt-dev
mailing list