aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
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-22 23:42:51 +0000
commit52658750ffb40386b7677de0330c1ab147e8679b (patch)
tree2e29e206732a5e71d3b77064d6a5d5a9a15d52cc /meta/recipes-extended
parent9d0fed7d3b2e70bc5d6bc2b0e1cc38166df3f0d2 (diff)
downloadopenembedded-core-contrib-52658750ffb40386b7677de0330c1ab147e8679b.tar.gz
chkconfig: Avoid using caddr_t
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch33
-rw-r--r--meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb4
2 files changed, 36 insertions, 1 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;
+ }
diff --git a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
index 488847ac40..e8390264ce 100644
--- a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
+++ b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
@@ -16,7 +16,9 @@ PROVIDES += "virtual/update-alternatives"
PR = "r7"
-SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2 \
+ file://replace_caddr_t.patch \
+ "
SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"