]> code.ossystems Code Review - meta-freescale.git/commitdiff
imx-kobs: Fix build with musl
authorKhem Raj <raj.khem@gmail.com>
Thu, 11 May 2017 16:57:46 +0000 (09:57 -0700)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 23 May 2017 01:27:03 +0000 (22:27 -0300)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
recipes-bsp/imx-kobs/imx-kobs/0001-Add-missing-includes-as-pointed-out-by-musl.patch [new file with mode: 0644]
recipes-bsp/imx-kobs/imx-kobs_git.bb

diff --git a/recipes-bsp/imx-kobs/imx-kobs/0001-Add-missing-includes-as-pointed-out-by-musl.patch b/recipes-bsp/imx-kobs/imx-kobs/0001-Add-missing-includes-as-pointed-out-by-musl.patch
new file mode 100644 (file)
index 0000000..9c86f07
--- /dev/null
@@ -0,0 +1,33 @@
+From c183a648958ab4454247cfd88d01da7730a53d19 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 11 May 2017 00:59:07 -0700
+Subject: [PATCH] Add missing includes as pointed out by musl
+
+These headers are indrectly included when building with
+glibc, this is exposed when compiling with musl systems
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mtd.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/mtd.h b/src/mtd.h
+index 6cb0ca2..0eaea48 100644
+--- a/src/mtd.h
++++ b/src/mtd.h
+@@ -25,9 +25,12 @@
+ #ifndef MTD_H
+ #define MTD_H
++#define _GNU_SOURCE
++#include <fcntl.h>
+ #include <mtd/mtd-user.h>
+ #include <endian.h>
+ #include <stdint.h>
++#include <stddef.h>
+ #include "BootControlBlocks.h"
+ #include "rom_nand_hamming_code_ecc.h"
+-- 
+2.12.2
+
index aab10f9c095e0af11f05ebe44cb33e621d0b666f..eaea16572053f90ff213556796094eeb32dd4a0a 100644 (file)
@@ -10,6 +10,8 @@ PV = "5.5+git${SRCPV}"
 SRCREV = "a2734b93759b4222f9dfa3f8c7645be9d39ea601"
 
 SRC_URI = "git://github.com/NXPmicro/imx-kobs.git;protocal=https"
+           file://0001-Add-missing-includes-as-pointed-out-by-musl.patch \
+"
 
 S = "${WORKDIR}/git"