summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorMarcel W. Wysocki <maci.stgn@gmail.com>2026-02-15 22:28:03 +0800
committerJohannes Berg <johannes.berg@intel.com>2026-03-21 10:41:44 +0100
commitd46dfb369a4627d90efc2c2ffbe29e38e3e74286 (patch)
tree3c1b17ab2bcba3c64fe044ac88d505d50eab1e4d /tools/lib/python/kdoc/parse_data_structs.py
parent4076f7329832074196e050def49d22265fce2021 (diff)
um: avoid struct sigcontext redefinition with musl
mcontext.c includes both <sys/ucontext.h> and <asm/sigcontext.h>. With musl libc, this causes a struct sigcontext redefinition error: <sys/ucontext.h> pulls in musl's <bits/signal.h>, which defines struct sigcontext directly. The kernel's <asm/sigcontext.h> then provides a second, conflicting definition of the same struct. With glibc this does not conflict because glibc's signal headers source their struct sigcontext from the kernel's own UAPI headers, so the include guard in <asm/sigcontext.h> makes the second inclusion a no-op. mcontext.c does not actually use struct sigcontext by name -- it only needs the FP-state types (_fpstate, _xstate, etc.) that are defined in <asm/sigcontext.h> independently of the sigcontext struct. Temporarily rename sigcontext to __kernel_sigcontext during the inclusion of <asm/sigcontext.h> so that the kernel's definition does not collide with musl's. The #undef restores normal name resolution immediately afterward. No functional change with glibc; fixes the build with musl. Signed-off-by: Marcel W. Wysocki <maci.stgn@gmail.com> Link: https://patch.msgid.link/20260215142803.1455757-2-maci.stgn@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions