diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-07-08 00:23:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-09 18:00:18 +0100 |
commit | f9ac3f3e200e4fd0dfe0f45ddc606ce945ea0143 (patch) | |
tree | 1df34d2b324d1f23a136f58509912ea892311c61 /meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch | |
parent | d32b383c3a7af0212cf6bfc942f4f8d6ae08d986 (diff) | |
download | poky-f9ac3f3e200e4fd0dfe0f45ddc606ce945ea0143.tar.gz |
elfutils: 0.162 -> 0.163
(From OE-Core rev: cb8fc7521cdaaa7b8f82a0c6dfc6526778c99099)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch')
-rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch new file mode 100644 index 0000000000..c08519cf53 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From: Kurt Roeckx <kurt@roeckx.be> | ||
2 | Subject: Use %m[ instead of %a[ in scanf() | ||
3 | |||
4 | %a was a gnu extention, but C99 made this a float. So it got | ||
5 | changed to %m (supported by glibc 2.7), but %a[ and %as are | ||
6 | still supported by glibc. The portability branch changed this | ||
7 | from %m to %a again since that's supported by more versions of | ||
8 | glibc. However gcc gives a warning about this using -Wformat | ||
9 | and we have a new enough libc to use %m. | ||
10 | |||
11 | Index: elfutils-0.153/src/addr2line.c | ||
12 | =================================================================== | ||
13 | --- elfutils-0.153.orig/src/addr2line.c 2012-02-24 22:29:50.000000000 +0000 | ||
14 | +++ elfutils-0.153/src/addr2line.c 2012-02-24 22:29:52.000000000 +0000 | ||
15 | @@ -455,10 +455,10 @@ | ||
16 | bool parsed = false; | ||
17 | int i, j; | ||
18 | char *name = NULL; | ||
19 | - if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 | ||
20 | + if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 | ||
21 | && string[i] == '\0') | ||
22 | parsed = adjust_to_section (name, &addr, dwfl); | ||
23 | - switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) | ||
24 | + switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) | ||
25 | { | ||
26 | default: | ||
27 | break; | ||
28 | Index: elfutils-0.153/tests/line2addr.c | ||
29 | =================================================================== | ||
30 | --- elfutils-0.153.orig/tests/line2addr.c 2012-02-24 22:29:50.000000000 +0000 | ||
31 | +++ elfutils-0.153/tests/line2addr.c 2012-02-24 22:29:52.000000000 +0000 | ||
32 | @@ -132,7 +132,7 @@ | ||
33 | { | ||
34 | struct args a = { .arg = argv[cnt] }; | ||
35 | |||
36 | - switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line)) | ||
37 | + switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line)) | ||
38 | { | ||
39 | default: | ||
40 | case 0: | ||