diff options
Diffstat (limited to 'meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch')
-rw-r--r-- | meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch new file mode 100644 index 000000000..852c1ed2c --- /dev/null +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From bbf2b5ed5d93b227df8aea5726727b48e29f6790 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 14 Sep 2017 23:35:40 -0700 | ||
4 | Subject: [PATCH 5/5] md2core: Replace basename() | ||
5 | |||
6 | musl does not provide it | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | src/tools/linux/md2core/minidump-2-core.cc | 5 ++++- | ||
11 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc | ||
14 | index 6a9e28eb..52b81c22 100644 | ||
15 | --- a/src/tools/linux/md2core/minidump-2-core.cc | ||
16 | +++ b/src/tools/linux/md2core/minidump-2-core.cc | ||
17 | @@ -107,6 +107,9 @@ struct Options { | ||
18 | |||
19 | static void | ||
20 | Usage(int argc, const char* argv[]) { | ||
21 | + const char *c_filename = argv[0];; | ||
22 | + const char *p = strrchr(c_filename, '/'); | ||
23 | + const char *base = p ? p+1 : c_filename; | ||
24 | fprintf(stderr, | ||
25 | "Usage: %s [options] <minidump file>\n" | ||
26 | "\n" | ||
27 | @@ -133,7 +136,7 @@ Usage(int argc, const char* argv[]) { | ||
28 | " lookups to be done in this directory rather than the filesystem\n" | ||
29 | " layout as it exists in the crashing image. This path should end\n" | ||
30 | " with a slash if it's a directory. e.g. /var/lib/breakpad/\n" | ||
31 | - "", basename(argv[0])); | ||
32 | + "", base); | ||
33 | } | ||
34 | |||
35 | static void | ||
36 | -- | ||
37 | 2.14.1 | ||
38 | |||