aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/chkconfig/chkconfig
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-08 09:01:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:29 +0000
commitf294813dfee9ccc8a6f213178e30d175d3694524 (patch)
treebdc45bbb21c01e8dec4b797ff1dbac667af37859 /meta/recipes-extended/chkconfig/chkconfig
parentb2aca0936347fb714662142031eb0a2d5f8a0744 (diff)
downloadopenembedded-core-contrib-f294813dfee9ccc8a6f213178e30d175d3694524.tar.gz
chkconfig: Avoid using caddr_t
(From OE-Core rev: 52658750ffb40386b7677de0330c1ab147e8679b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/chkconfig/chkconfig')
-rw-r--r--meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch b/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
new file mode 100644
index 0000000000..96d1938791
--- /dev/null
+++ b/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
@@ -0,0 +1,33 @@
+caddr_t is a legacy BSD type which was rejected by the POSIX standard.
+Use void * instead.
+
+sys/unitstd.h is not needed and moreover its not available on all C library
+implementations e.g. musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: chkconfig-1.3.58/alternatives.c
+===================================================================
+--- chkconfig-1.3.58.orig/alternatives.c
++++ chkconfig-1.3.58/alternatives.c
+@@ -22,7 +22,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/stat.h>
+-#include <sys/unistd.h>
+ #include <unistd.h>
+
+ #define FLAGS_TEST (1 << 0)
+Index: chkconfig-1.3.58/leveldb.c
+===================================================================
+--- chkconfig-1.3.58.orig/leveldb.c
++++ chkconfig-1.3.58/leveldb.c
+@@ -442,7 +442,7 @@ int parseServiceInfo(int fd, char * name
+ fstat(fd, &sb);
+
+ bufstart = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
+- if (bufstart == ((caddr_t) -1)) {
++ if (bufstart == ((void*) -1)) {
+ close(fd);
+ return -1;
+ }