toolchain: bump Codescape IMG MIPS version to 2016.05-06
[buildroot-gz.git] / package / freescale-imx / imx-kobs / 0001-Fix-musl-build.patch
blobce123de9cc4972a2c13ab88522ba4d6eb5d5cca6
1 [PATCH] Fix musl build
3 Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
4 ---
5 src/mtd.c | 1 +
6 src/mtd.h | 5 +++++
7 2 files changed, 6 insertions(+)
9 diff --git a/src/mtd.c b/src/mtd.c
10 index 1edc441..6d2264c 100644
11 --- a/src/mtd.c
12 +++ b/src/mtd.c
13 @@ -31,6 +31,7 @@
14 #include <fcntl.h>
15 #include <ctype.h>
16 #include <errno.h>
17 +#include <stddef.h>
18 #include <sys/types.h>
19 #include <sys/ioctl.h>
21 diff --git a/src/mtd.h b/src/mtd.h
22 index bd21add..debfc84 100644
23 --- a/src/mtd.h
24 +++ b/src/mtd.h
25 @@ -31,6 +31,11 @@
26 #include "BootControlBlocks.h"
27 #include "rom_nand_hamming_code_ecc.h"
29 +// musl library doesn't define loff_t
30 +#if !defined(__GLIBC__) && !defined(__UCLIBC__)
31 +#define loff_t off_t
32 +#endif
34 //------------------------------------------------------------------------------
35 // Re-definitions of true and false, because the standard ones aren't good
36 // enough?
37 --
38 2.5.1