diff options
| author | Edward Liaw <[email protected]> | 2024-06-05 22:36:35 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-07-04 02:30:09 +0000 |
| commit | 8192bc03d908c60c95b72dd0acfc8e37a33ab2f7 (patch) | |
| tree | 1017470ea9a92797f6689d31125c427ca2565c76 /mm/sparse.c | |
| parent | selftests/mm: include linux/mman.h (diff) | |
| download | kernel-8192bc03d908c60c95b72dd0acfc8e37a33ab2f7.tar.gz kernel-8192bc03d908c60c95b72dd0acfc8e37a33ab2f7.zip | |
selftests/mm: guard defines from shm
thuge-gen.c defines SHM_HUGE_* macros that are provided by the uapi since
4.14. These macros get redefined when compiling with Android's bionic
because its sys/shm.h will import the uapi definitions.
However if linux/shm.h is included, with glibc, sys/shm.h will clash on
some struct definitions:
/usr/include/linux/shm.h:26:8: error: redefinition of ‘struct shmid_ds’
26 | struct shmid_ds {
| ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/shm.h:45,
from /usr/include/x86_64-linux-gnu/sys/shm.h:30:
/usr/include/x86_64-linux-gnu/bits/types/struct_shmid_ds.h:24:8: note: originally defined here
24 | struct shmid_ds
| ^~~~~~~~
For now, guard the SHM_HUGE_* defines with ifndef to prevent redefinition
warnings on Android bionic.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Edward Liaw <[email protected]>
Reviewed-by: Carlos Llamas <[email protected]>
Reviewed-by: Muhammad Usama Anjum <[email protected]>
Cc: Bill Wendling <[email protected]>
Cc: Carlos Llamas <[email protected]>
Cc: Justin Stitt <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/sparse.c')
0 files changed, 0 insertions, 0 deletions
