[oe,meta-oe,3/6] mraa: Fix build on musl

Message ID 20180206074619.22165-3-raj.khem@gmail.com
State New
Headers show
Series
  • [oe,meta-networking,1/6] mdns: Do not include nss.h with musl
Related show

Commit Message

Khem Raj Feb. 6, 2018, 7:46 a.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...ian.h-for-be16toh-and-le16toh-declaration.patch | 27 ++++++++++++++++++++++
 meta-oe/recipes-extended/mraa/mraa_git.bb          |  4 +++-
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/mraa/mraa/0001-include-endian.h-for-be16toh-and-le16toh-declaration.patch

-- 
2.16.1

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-oe/recipes-extended/mraa/mraa/0001-include-endian.h-for-be16toh-and-le16toh-declaration.patch b/meta-oe/recipes-extended/mraa/mraa/0001-include-endian.h-for-be16toh-and-le16toh-declaration.patch
new file mode 100644
index 000000000..711738a92
--- /dev/null
+++ b/meta-oe/recipes-extended/mraa/mraa/0001-include-endian.h-for-be16toh-and-le16toh-declaration.patch
@@ -0,0 +1,27 @@ 
+From 2c85decc3b93bfe7322309d2ca7d6377e746c18f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 5 Feb 2018 09:51:08 -0800
+Subject: [PATCH] include endian.h for be16toh and le16toh declarations
+
+Upstream-Status: Submitted [https://github.com/intel-iot-devkit/mraa/pull/863]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ examples/iio_driver.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/examples/iio_driver.c b/examples/iio_driver.c
+index c5a0181..568011c 100644
+--- a/examples/iio_driver.c
++++ b/examples/iio_driver.c
+@@ -22,6 +22,7 @@
+  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+  */
+ 
++#include <endian.h>
+ #include <unistd.h>
+ #include "mraa/iio.h"
+ 
+-- 
+2.16.1
+
diff --git a/meta-oe/recipes-extended/mraa/mraa_git.bb b/meta-oe/recipes-extended/mraa/mraa_git.bb
index c4b9c6f90..473116e63 100644
--- a/meta-oe/recipes-extended/mraa/mraa_git.bb
+++ b/meta-oe/recipes-extended/mraa/mraa_git.bb
@@ -8,7 +8,9 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=66493d54e65bfc12c7983ff2e884f37f"
 SRCREV = "8ddbcde84e2d146bc0f9e38504d6c89c14291480"
 PV = "1.7.0-git${SRCPV}"
 
-SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http"
+SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
+           file://0001-include-endian.h-for-be16toh-and-le16toh-declaration.patch \
+           "
 
 S = "${WORKDIR}/git"