mraa: fix build for musl

* be16toh and le16toh are defined in endian.h

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Tim Orling 2018-01-27 02:24:28 -08:00 committed by Armin Kuster
parent 427184e46a
commit 75356b6a76
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From 6c2649718fc9818da0d602a0b4767ea21a367e9e Mon Sep 17 00:00:00 2001
From: Tim Orling <timothy.t.orling@linux.intel.com>
Date: Sat, 27 Jan 2018 02:06:36 -0800
Subject: [PATCH] examples/iio_driver.c: include endian.h to fix musl build
* be16toh and le16toh are defined in endian.h
Upstream-Status: Pending
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.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..e3dc438 100644
--- a/examples/iio_driver.c
+++ b/examples/iio_driver.c
@@ -23,6 +23,7 @@
*/
#include <unistd.h>
+#include <endian.h>
#include "mraa/iio.h"
static void
--
2.13.6

View File

@ -10,6 +10,8 @@ PV = "1.7.0-git${SRCPV}"
SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http"
SRC_URI_append_libc-musl = " file://0001-examples-iio_driver.c-include-endian.h-to-fix-musl-b.patch"
S = "${WORKDIR}/git"
# CMakeLists.txt checks the architecture, only x86 and ARM supported for now