aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-09 19:42:19 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-22 23:42:52 +0000
commitb9c870a25757ab11f4167c076449a3de537247cf (patch)
treecbae32e44f63808c631675d7b25872000447a30c
parent149a5202d32650775386e166ed06855097256977 (diff)
downloadopenembedded-core-contrib-b9c870a25757ab11f4167c076449a3de537247cf.tar.gz
openembedded-core-contrib-b9c870a25757ab11f4167c076449a3de537247cf.tar.bz2
openembedded-core-contrib-b9c870a25757ab11f4167c076449a3de537247cf.zip
apmd: Fix build with musl
Fix error like below | apmd.c:372:41: error: use of undeclared identifier '__WCOREFLAG' | status = __W_EXITCODE(0, SIGTERM) | __WCOREFLAG; | ^ | apmd.c:392:41: error: use of undeclared identifier '__WCOREFLAG' | status = __W_EXITCODE(0, SIGTERM) | __WCOREFLAG; Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta/recipes-bsp/apmd/apmd/wexitcode.patch26
-rw-r--r--meta/recipes-bsp/apmd/apmd_3.2.2-15.bb1
2 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-bsp/apmd/apmd/wexitcode.patch b/meta/recipes-bsp/apmd/apmd/wexitcode.patch
new file mode 100644
index 0000000000..c5faa85fa7
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd/wexitcode.patch
@@ -0,0 +1,26 @@
+Define non-posix W* funcitons
+
+C libraries like musl dont define them
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: apmd-3.2.2.orig/apmd.c
+===================================================================
+--- apmd-3.2.2.orig.orig/apmd.c
++++ apmd-3.2.2.orig/apmd.c
+@@ -55,6 +55,14 @@
+ #define MINIMUM_RATE_CALC_TIME 120
+ #endif
+
++#ifndef _POSIX_SOURCE
++
++#define __WCOREFLAG 0200
++#define __WCOREDUMP(x) (_W_INT(x) & __WCOREFLAG)
++#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
++
++#endif
++
+ /*
+ * For the verbosity level feature to be useful,
+ * we rely on the fact that syslog.h assigns adjacent
diff --git a/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb b/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
index 9492c6994e..a932375205 100644
--- a/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
+++ b/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
@@ -13,6 +13,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \
file://legacy.patch \
file://libtool.patch \
file://unlinux.patch \
+ file://wexitcode.patch \
file://init \
file://default \
file://apmd_proxy \