diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2018-01-29 00:05:07 +0100 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-02-11 11:50:56 -0800 |
commit | edbe41f53ec15eeae4673498c41a1f3a42ac813b (patch) | |
tree | d27d63b3249b2d4ebfee8ad5e837466d256e7ac2 /meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch | |
parent | 75356b6a76e965f6e282e8219e88afc1ab4f3240 (diff) | |
download | meta-openembedded-edbe41f53ec15eeae4673498c41a1f3a42ac813b.tar.gz |
ubi-utils-klibc_1.5.2: fix build for qemuarm
Building the recipe with TUNE_FEATURES = "aarch64" and TARGET_FPU = ""
fails. See patch headers for more details.
Patch sent upstream for master, here rebased for 1.5.2.
Tested runtime on armv5.
While there backport one more patch fixing warnings in libmtd.c and
move the patches in their specific dir, preparing for v2.0.1.
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch')
-rw-r--r-- | meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch deleted file mode 100644 index 6b09c14d6..000000000 --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 8318852ef4f768bed31072aa7b57e11adc1f639c Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrea Adami <andrea.adami@gmail.com> | ||
3 | Date: Sun, 29 Jun 2014 00:44:03 +0200 | ||
4 | Subject: [PATCH 5/6] common.h: more workarounds for klibc compatibility | ||
5 | |||
6 | Patch is addressing two issues: | ||
7 | * First, Klibc doesn't have rpmatch(). | ||
8 | * Second, Klibc lacks getline() | ||
9 | |||
10 | Fixes: | ||
11 | | LD ubi-utils/ubiformat | ||
12 | | .../git/ubi-utils/ubiformat.o: In function `prompt': | ||
13 | | .../git/./include/common.h:157: undefined reference to `getline' | ||
14 | | .../git/./include/common.h:164: undefined reference to `rpmatch' | ||
15 | | .../git/./include/common.h:157: undefined reference to `getline' | ||
16 | | .../git/./include/common.h:164: undefined reference to `rpmatch' | ||
17 | |||
18 | Upstream-Status: Pending | ||
19 | |||
20 | Signed-off-by: Andrea Adami <andrea.adami@gmail.com> | ||
21 | --- | ||
22 | include/common.h | 10 ++++++---- | ||
23 | 1 file changed, 6 insertions(+), 4 deletions(-) | ||
24 | |||
25 | Index: git/include/common.h | ||
26 | =================================================================== | ||
27 | --- git.orig/include/common.h | ||
28 | +++ git/include/common.h | ||
29 | @@ -161,15 +161,17 @@ static inline int __rpmatch(const char * | ||
30 | */ | ||
31 | static inline bool prompt(const char *msg, bool def) | ||
32 | { | ||
33 | - char *line = NULL; | ||
34 | - size_t len; | ||
35 | + char *line; | ||
36 | bool ret = def; | ||
37 | |||
38 | + const int sizeof_line = 2; | ||
39 | + line = malloc(sizeof_line); | ||
40 | + | ||
41 | do { | ||
42 | normsg_cont("%s (%c/%c) ", msg, def ? 'Y' : 'y', def ? 'n' : 'N'); | ||
43 | fflush(stdout); | ||
44 | |||
45 | - while (getline(&line, &len, stdin) == -1) { | ||
46 | + while (fgets(line, sizeof_line, stdin) == NULL) { | ||
47 | printf("failed to read prompt; assuming '%s'\n", | ||
48 | def ? "yes" : "no"); | ||
49 | break; | ||