diff options
Diffstat (limited to 'meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0006-libiniparser-remove-unused-function-needing-float.patch')
-rw-r--r-- | meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0006-libiniparser-remove-unused-function-needing-float.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0006-libiniparser-remove-unused-function-needing-float.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0006-libiniparser-remove-unused-function-needing-float.patch new file mode 100644 index 0000000000..d046f95050 --- /dev/null +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc-1.5.2/0006-libiniparser-remove-unused-function-needing-float.patch | |||
@@ -0,0 +1,85 @@ | |||
1 | From 2af30e9b2988111e45ed6ea6af55e49ec7cb1cb1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrea Adami <andrea.adami@gmail.com> | ||
3 | Date: Sun, 29 Jun 2014 00:44:57 +0200 | ||
4 | Subject: [PATCH 6/9] libiniparser: remove unused function needing float | ||
5 | |||
6 | Fixes: | ||
7 | | LD ubi-utils/ubiformat | ||
8 | | .../git/ubi-utils/libiniparser.a(libiniparser.o): In function | ||
9 | | ` LD ubi-utils/ubirename | ||
10 | | iniparser_getdouble': | ||
11 | | .../git/ubi-utils/libiniparser.c:336: undefined reference to `atof' | ||
12 | |||
13 | Grep doesn't reveal any occurrence of iniparser_getdouble(), using atof() so | ||
14 | remove it: floating-point is not supported in klibc | ||
15 | |||
16 | Upstream-Status: Accepted | ||
17 | |||
18 | Signed-off-by: Andrea Adami <andrea.adami@gmail.com> | ||
19 | --- | ||
20 | ubi-utils/include/libiniparser.h | 15 --------------- | ||
21 | ubi-utils/libiniparser.c | 22 ---------------------- | ||
22 | 2 files changed, 37 deletions(-) | ||
23 | |||
24 | diff --git a/ubi-utils/include/libiniparser.h b/ubi-utils/include/libiniparser.h | ||
25 | index be3c667..abd77aa 100644 | ||
26 | --- a/ubi-utils/include/libiniparser.h | ||
27 | +++ b/ubi-utils/include/libiniparser.h | ||
28 | @@ -158,21 +158,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound); | ||
29 | |||
30 | /*-------------------------------------------------------------------------*/ | ||
31 | /** | ||
32 | - @brief Get the string associated to a key, convert to a double | ||
33 | - @param d Dictionary to search | ||
34 | - @param key Key string to look for | ||
35 | - @param notfound Value to return in case of error | ||
36 | - @return double | ||
37 | - | ||
38 | - This function queries a dictionary for a key. A key as read from an | ||
39 | - ini file is given as "section:key". If the key cannot be found, | ||
40 | - the notfound value is returned. | ||
41 | - */ | ||
42 | -/*--------------------------------------------------------------------------*/ | ||
43 | -double iniparser_getdouble(dictionary * d, char * key, double notfound); | ||
44 | - | ||
45 | -/*-------------------------------------------------------------------------*/ | ||
46 | -/** | ||
47 | @brief Get the string associated to a key, convert to a boolean | ||
48 | @param d Dictionary to search | ||
49 | @param key Key string to look for | ||
50 | diff --git a/ubi-utils/libiniparser.c b/ubi-utils/libiniparser.c | ||
51 | index 898f57f..ba70c08 100644 | ||
52 | --- a/ubi-utils/libiniparser.c | ||
53 | +++ b/ubi-utils/libiniparser.c | ||
54 | @@ -316,28 +316,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound) | ||
55 | |||
56 | /*-------------------------------------------------------------------------*/ | ||
57 | /** | ||
58 | - @brief Get the string associated to a key, convert to a double | ||
59 | - @param d Dictionary to search | ||
60 | - @param key Key string to look for | ||
61 | - @param notfound Value to return in case of error | ||
62 | - @return double | ||
63 | - | ||
64 | - This function queries a dictionary for a key. A key as read from an | ||
65 | - ini file is given as "section:key". If the key cannot be found, | ||
66 | - the notfound value is returned. | ||
67 | - */ | ||
68 | -/*--------------------------------------------------------------------------*/ | ||
69 | -double iniparser_getdouble(dictionary * d, char * key, double notfound) | ||
70 | -{ | ||
71 | - char * str ; | ||
72 | - | ||
73 | - str = iniparser_getstring(d, key, INI_INVALID_KEY); | ||
74 | - if (str==INI_INVALID_KEY) return notfound ; | ||
75 | - return atof(str); | ||
76 | -} | ||
77 | - | ||
78 | -/*-------------------------------------------------------------------------*/ | ||
79 | -/** | ||
80 | @brief Get the string associated to a key, convert to a boolean | ||
81 | @param d Dictionary to search | ||
82 | @param key Key string to look for | ||
83 | -- | ||
84 | 2.7.4 | ||
85 | |||