diff options
author | Tony Ambardar <tony.ambardar@gmail.com> | 2020-09-17 16:54:37 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-04-17 03:40:51 +0300 |
commit | 7de21e679e6a789f3729e8402bc440b623a28eae (patch) | |
tree | b153a7cbe819c69f151f296263e9052bcb71020a /arch/powerpc/kernel/interrupt.c | |
parent | c1e53367dab15e41814cff4e37df8ec4ac8fb9d7 (diff) | |
download | linux-7de21e679e6a789f3729e8402bc440b623a28eae.tar.xz |
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
Diffstat (limited to 'arch/powerpc/kernel/interrupt.c')
0 files changed, 0 insertions, 0 deletions