[PATCH i-g-t v2 1/2] lib/svga/vm_basic_types: fix musl libs compilation on Void Linux
Gwan-gyeong Mun
gwan-gyeong.mun at intel.com
Tue Jul 22 10:29:11 UTC 2025
Looks good to me.
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
On 7/21/25 6:58 PM, Kamil Konieczny wrote:
> Fix gcc compilation on Void Linux with musl C libs, where
> PAGE_SIZE is already defined.
>
> v2: added more devs to Cc, updated subject (Kamil)
>
> Cc: Andrzej Hajda <andrzej.hajda at intel.com>
> Cc: Zack Rusin <zack.rusin at broadcom.com>
> Cc: Maaz Mombasawala <maaz.mombasawala at broadcom.com>
> Cc: Martin Krastev <martin.krastev at broadcom.com>
> Reported-by: zlice <zlice555 at gmail.com>
> Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/179
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
> lib/svga/vm_basic_types.h | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/lib/svga/vm_basic_types.h b/lib/svga/vm_basic_types.h
> index 8fec5b665..ea10a683c 100644
> --- a/lib/svga/vm_basic_types.h
> +++ b/lib/svga/vm_basic_types.h
> @@ -27,7 +27,15 @@
> #define VM_BASIC_TYPES_H
>
> #define PAGE_SHIFT 12
> -#define PAGE_SIZE (1 << PAGE_SHIFT)
> +
> +#ifndef PAGE_SIZE
> +# define PAGE_SIZE (1 << PAGE_SHIFT)
> +#else
> +# if PAGE_SIZE != 4096
> +# error "Unexpected PAGE_SIZE"
> +# endif
> +#endif
> +
> #define PAGE_MASK (~(PAGE_SIZE - 1))
> #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
>
More information about the igt-dev
mailing list