linux/tools
Edward Liaw 12452bcbcc 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/20240605223637.1374969-3-edliaw@google.com
Signed-off-by: Edward Liaw <edliaw@google.com>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Carlos Llamas <cmllamas@google.com>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-06-15 11:31:06 -07:00
..
accounting
arch tools headers arm64: Sync arm64's cputype.h with the kernel sources 2024-06-04 16:46:40 -03:00
bootconfig
bpf bpf: Fix potential integer overflow in resolve_btfids 2024-05-24 17:12:12 +02:00
build
certs
cgroup proc: rewrite stable_page_flags() 2024-04-25 20:56:15 -07:00
counter
crypto crypto: ccp - Update return values for some unit tests 2024-02-24 08:41:20 +08:00
debugging
firewire
firmware
gpio
hv Merge 6.9-rc5 into char-misc-next 2024-04-23 13:16:03 +02:00
iio
include selftests/mm: fix vm_util.c build failures: add snapshot of fs.h 2024-06-15 11:31:01 -07:00
kvm/kvm_stat
laptop
leds
lib libbpf: don't close(-1) in multi-uprobe feature detector 2024-05-31 14:56:51 -07:00
memory-model
mm tools/mm: add thpmaps script to dump THP usage info 2024-02-22 10:24:38 -08:00
net/ynl ynl: ensure exact-len value is resolved 2024-05-13 14:59:24 -07:00
objtool objtool: Fix compile failure when using the x32 compiler 2024-03-30 22:12:37 +01:00
pci
pcmcia
perf perf bpf: Fix handling of minimal vmlinux.h file when interrupting the build 2024-06-05 11:33:00 -03:00
power tools/power/cpupower: Fix Pstate frequency reporting on AMD Family 1Ah CPUs 2024-05-28 09:22:57 -06:00
rcu
scripts treewide: remove meaningless assignments in Makefiles 2024-02-23 14:19:07 -08:00
sound ASoC: dapm-graph: new tool to visualize DAPM state 2024-04-21 09:58:17 +09:00
spi
testing selftests/mm: guard defines from shm 2024-06-15 11:31:06 -07:00
thermal
time
tracing tools/latency-collector: Fix -Wformat-security compile warns 2024-05-23 10:46:01 -04:00
usb
verification tools/verification: Use tools/build makefiles on rv 2024-03-20 05:39:06 +01:00
virtio tools: virtio: introduce vhost_net_test 2024-03-05 11:38:14 +01:00
wmi
workqueue workqueue: remove unnecessary import and function in wq_monitor.py 2024-03-25 10:11:32 -10:00
writeback writeback: add wb_monitor.py script to monitor writeback info on bdi 2024-05-05 17:53:51 -07:00
Makefile tools/Makefile: remove cgroup target 2024-03-26 11:07:21 -07:00