[LTP] [PATCH 1/3] lapi/mmap: add MAP_32BIT fallback

Petr Vorel pvorel@suse.cz
Fri Sep 11 15:20:38 CEST 2026


Hi Andrea,

> +++ b/include/lapi/mmap.h
> @@ -91,6 +91,10 @@
>  # define MAP_DROPPABLE 0x08
>  #endif

> +#ifndef MAP_32BIT
> +# define MAP_32BIT 0x40

I know you guard the tests with .supported_archs to x86_64, but even that
wouldn't be safer to define 0x40 only for x86_64?

#ifndef MAP_32BIT
# if defined __i386__ || defined(__x86_64__)
#  define MAP_32BIT 0x40
# else
#  define MAP_32BIT 0
# endif
#endif

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list