[meta-intel] [PATCH 07/10] zlib-qat: Add patch to support MUSL

Saul Wold sgw at linux.intel.com
Fri Feb 10 11:10:11 PST 2017


MUSL has a stricter policy for header inclusion, so add patch
to explictly include pthread.h

Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
 .../0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch   | 29 ++++++++++++++++++++++
 .../zlib-qat/zlib-qat_0.4.7-002.bb                 |  4 +++
 2 files changed, 33 insertions(+)
 create mode 100644 common/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch

diff --git a/common/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch b/common/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch
new file mode 100644
index 0000000..b45ae79
--- /dev/null
+++ b/common/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch
@@ -0,0 +1,29 @@
+From 30c4a1181cbe696dd1b9f52c8e9422ef8c331e8f Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw at linux.intel.com>
+Date: Thu, 9 Feb 2017 12:40:47 -0800
+Subject: [PATCH] qat_zlib.h: Add pthread.h for MUSL
+
+MUSL is stricter when it comes to header file inclusion, so add
+the additional header thats needed to compile with MUSL.
+
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw at linux.intel.com>
+---
+ qat_zlib.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/qat_zlib.h b/qat_zlib.h
+index 2747f84..d9ac312 100644
+--- a/qat_zlib.h
++++ b/qat_zlib.h
+@@ -8,6 +8,7 @@
+ #include <stdlib.h>
+ #include <assert.h>
+ #include <time.h>
++#include <pthread.h>
+ 
+ #include "cpa_dc.h"
+ #ifdef USE_QAE_MEM
+-- 
+2.7.4
+
diff --git a/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
index d46e5fe..f5b247b 100644
--- a/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
+++ b/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
@@ -22,6 +22,7 @@ SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \
            file://zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch \
            file://zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch \
            "
+SRC_URI_append_libc-musl = " file://0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch"
 
 SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40"
 SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
@@ -81,6 +82,9 @@ python do_patch() {
     bb.build.exec_func('patch_do_patch', d)
 }
 
+#addtask zlibqat_patch after do_prepare_recipe_sysroot before patch_do_patch
+#addtask do_zlibqat_patch after do_prepare_recipe_sysroot before do_configure
+
 do_configure() {
         ./configure --prefix=${prefix} --shared --libdir=${libdir}
 }
-- 
2.7.4



More information about the meta-intel mailing list