=======================================================================
Build failure is:
CC libbpf.o
In file included from /home/sandu/work/Wrt1/openwrt/build_dir/target-powerpc_8540_musl-1.1.14_ewok/linux-mpc85xx_ewok/linux-4.4.6/arch/powerpc/include/uapi/asm/errno.h:4:0,
from /home/sandu/work/Wrt1/openwrt/build_dir/target-powerpc_8540_musl-1.1.14_ewok/linux-mpc85xx_ewok/linux-4.4.6/tools/include/linux/err.h:7,
from libbpf.h:13,
from libbpf.c:24:
/home/sandu/work/Wrt1/openwrt/build_dir/target-powerpc_8540_musl-1.1.14_ewok/linux-mpc85xx_ewok/linux-4.4.6/include/uapi/asm-generic/errno.h:39:0: error: "EDEADLOCK" redefined [-Werror]
#define EDEADLOCK EDEADLK
^
In file included from /home/sandu/work/Wrt1/openwrt/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/errno.h:10:0,
from libbpf.c:16:
/home/sandu/work/Wrt1/openwrt/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/bits/errno.h:58:0: note: this is the location of the previous definition
#define EDEADLOCK 58
^
cc1: all warnings being treated as errors
CC bpf.o
LD libbpf-in.o
powerpc-openwrt-linux-musl-ld: cannot find libbpf.o: No such file or directory
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
---
.../301-fix-edeadlock-define-collisions-with-musl.patch | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 target/linux/mpc85xx/patches-4.4/301-fix-edeadlock-define-collisions-with-musl.patch
new file mode 100644
@@ -0,0 +1,15 @@
+diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h
+index 88e0914..7549bec 100644
+--- a/include/uapi/asm-generic/errno.h
++++ b/include/uapi/asm-generic/errno.h
+@@ -36,7 +36,9 @@
+ #define EBADRQC 56 /* Invalid request code */
+ #define EBADSLT 57 /* Invalid slot */
+
+-#define EDEADLOCK EDEADLK
++#ifndef EDEADLOCK
++#define EDEADLOCK 58
++#endif
+
+ #define EBFONT 59 /* Bad font file format */
+ #define ENOSTR 60 /* Device not a stream */