summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch')
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch b/import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch
new file mode 100644
index 000000000..c5faa85fa
--- /dev/null
+++ b/import-layers/yocto-poky/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
OpenPOWER on IntegriCloud