linux-stable/arch/powerpc/include/uapi/asm
Tony Ambardar 7de21e679e powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h
A few archs like powerpc have different errno.h values for macros
EDEADLOCK and EDEADLK. In code including both libc and linux versions of
errno.h, this can result in multiple definitions of EDEADLOCK in the
include chain. Definitions to the same value (e.g. seen with mips) do
not raise warnings, but on powerpc there are redefinitions changing the
value, which raise warnings and errors (if using "-Werror").

Guard against these redefinitions to avoid build errors like the following,
first seen cross-compiling libbpf v5.8.9 for powerpc using GCC 8.4.0 with
musl 1.1.24:

  In file included from ../../arch/powerpc/include/uapi/asm/errno.h:5,
                   from ../../include/linux/err.h:8,
                   from libbpf.c:29:
  ../../include/uapi/asm-generic/errno.h:40: error: "EDEADLOCK" redefined [-Werror]
   #define EDEADLOCK EDEADLK

  In file included from toolchain-powerpc_8540_gcc-8.4.0_musl/include/errno.h:10,
                   from libbpf.c:26:
  toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/errno.h:58: note: this is the location of the previous definition
   #define EDEADLOCK       58

  cc1: all warnings being treated as errors

Cc: Stable <stable@vger.kernel.org>
Reported-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200917135437.1238787-1-Tony.Ambardar@gmail.com
2021-04-17 10:40:51 +10:00
..
auxvec.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
bitsperlong.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
bootx.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
bpf_perf_event.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
byteorder.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
cputable.h powerpc: Add new HWCAP bits 2020-06-02 20:59:19 +10:00
eeh.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
elf.h powerpc/ptrace: Add memory protection key regset 2018-01-20 22:59:06 +11:00
epapr_hcalls.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
errno.h powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h 2021-04-17 10:40:51 +10:00
fcntl.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
ioctl.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
ioctls.h tty/serial_core: add ISO7816 infrastructure 2018-10-02 13:38:55 -07:00
ipcbuf.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
kvm.h KVM: PPC: Book3S HV: Add infrastructure to support 2nd DAWR 2021-02-10 14:31:08 +11:00
kvm_para.h docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
mman.h Revert "powerpc/64s: Remove PROT_SAO support" 2020-08-24 14:12:53 +10:00
msgbuf.h arch: msgbuf.h: make uapi asm/msgbuf.h self-contained 2019-12-04 19:44:14 -08:00
nvram.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
opal-prd.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
papr_pdsm.h powerpc/papr_scm: Add support for fetching nvdimm 'fuel-gauge' metric 2020-07-31 22:55:28 +10:00
perf_event.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
perf_regs.h powerpc/perf: Expose Performance Monitor Counter SPR's as part of extended regs 2021-02-09 01:09:44 +11:00
posix_types.h powerpc/32: Remove powerpc specific definition of 'ptrdiff_t' 2021-04-08 21:17:46 +10:00
ps3fb.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
ptrace.h powerpc/watchpoint/ptrace: Introduce PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 2020-09-15 22:13:20 +10:00
sembuf.h arch: sembuf.h: make uapi asm/sembuf.h self-contained 2019-12-04 19:44:14 -08:00
setup.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
shmbuf.h y2038: ipc: remove __kernel_time_t reference from headers 2019-11-15 14:38:28 +01:00
sigcontext.h powerpc/uapi: Fix sigcontext definition to use user_pt_regs 2018-10-19 15:09:04 +11:00
signal.h arch: move SA_* definitions to generic headers 2020-11-23 10:31:05 -06:00
socket.h socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes 2019-02-03 11:17:31 -08:00
spu_info.h powerpc: Replace GPL boilerplate with SPDX identifiers 2019-11-13 16:58:07 +11:00
stat.h y2038: stat: avoid 'time_t' in 'struct stat' 2019-11-15 14:38:28 +01:00
swab.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
termbits.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
termios.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
tm.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
types.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
ucontext.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
unistd.h powerpc: generate uapi header and system call table files 2018-12-21 14:46:50 +11:00
vas-api.h powerpc/vas: Include linux/types.h in uapi/asm/vas-api.h 2020-04-22 20:02:14 +10:00