[PATCH i-g-t v1 1/3] lib/igt_vc4: Fix musl libc compilation

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri Jul 11 11:32:39 UTC 2025


Hi ,
On 2025-07-10 at 21:00:14 +0200, Kamil Konieczny wrote:
> Fix gcc compilation on Void Linux with musl C libs, where
> PAGE_SIZE is already defined.
> 

Sorry, I forgot adding vc4 developers to Cc:

Cc: "Maíra Canal" <mcanal at igalia.com>
Cc: Melissa Wen <mwen at igalia.com>
Cc: Louis Chauvet <louis.chauvet at bootlin.com>
Cc: Vignesh Raman <vignesh.raman at collabora.com>

Also +cc Andrzej Hajda <andrzej.hajda at intel.com>

> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
>  lib/igt_vc4.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_vc4.h b/lib/igt_vc4.h
> index fe7173c50..165872ba2 100644
> --- a/lib/igt_vc4.h
> +++ b/lib/igt_vc4.h
> @@ -31,7 +31,13 @@
>  #include "igt_fb.h"
>  #include "vc4_drm.h"
>  
> -#define PAGE_SIZE 4096
> +#ifndef PAGE_SIZE
> +# define PAGE_SIZE 4096
> +#else
> +# if PAGE_SIZE != 4096
> +#  error "Unexpected PAGE_SIZE"
> +# endif
> +#endif

I am not sure if vc4 needs exactly 4KB as bo, or is it good
to have whatever comes from compilation environment?
Other proposed change was smaller:

#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
#endif

Regards,
Kamil

>  
>  uint32_t igt_vc4_get_cleared_bo(int fd, size_t size, uint32_t clearval);
>  int igt_vc4_create_bo(int fd, size_t size);
> -- 
> 2.50.1
> 


More information about the igt-dev mailing list