[PATCH i-g-t v11 4/7] runner: Include local glib header for Android

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri May 30 18:38:17 UTC 2025


Hi Jeevaka,
On 2025-05-29 at 17:12:43 +0000, Jeevaka Prabu Badrappan wrote:
> 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?

Regards,
Kamil

> 
> 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
> 


More information about the igt-dev mailing list