[OpenWrt-Devel] [PATCH] [RFC] toolchain/musl/ppc: add header guards for EDEADLOCK define

Alexandru Ardelean ardeleanalex at gmail.com
Wed Apr 27 10:14:19 EDT 2016

The header guard is the same as in:

I've sent another patch for this issue, but reconsidered on it.
Patch is here: http://patchwork.ozlabs.org/patch/614830/

The issue is a collision on the EDEADLOCK define between
musl's <errno.h> and the kernel's <errno.h> when building
perf, libbpf and other stuff in the kernel/tools folder.
It only occurs on the PowerPc arch.

I still don't know what's best:
1. Patch musl for PowerPc (as this patch does)
2. Patch the kernel for PowerPc (as with above mentioned patch)
3. Fix perf, libbpf, etc individually etc

Hence the RFC on this patch.

Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
 .../musl/patches/301-ppc-add-header-guards-user-h.patch | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 toolchain/musl/patches/301-ppc-add-header-guards-user-h.patch

diff --git a/toolchain/musl/patches/301-ppc-add-header-guards-user-h.patch b/toolchain/musl/patches/301-ppc-add-header-guards-user-h.patch
new file mode 100644
index 0000000..2712d19
--- /dev/null
+++ b/toolchain/musl/patches/301-ppc-add-header-guards-user-h.patch
@@ -0,0 +1,17 @@
+diff --git a/arch/powerpc/bits/errno.h b/arch/powerpc/bits/errno.h
+index 36ad2f9..1011bf7 100644
+--- a/arch/powerpc/bits/errno.h
++++ b/arch/powerpc/bits/errno.h
+@@ -55,7 +55,10 @@
+ #define ENOANO          55
+ #define EBADRQC         56
+ #define EBADSLT         57
+ #define EDEADLOCK       58 
+ #define EBFONT          59
+ #define ENOSTR          60
+ #define ENODATA         61
+diff --git a/arch/powerpc/bits/user.h b/arch/powerpc/bits/user.h
+index 6cc8aaf..e1d06f6 100644
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list