Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From bfe68126693f9159f7ac66a69217e0b5f43e5781 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 20 Jul 2017 21:11:21 -0700 |
| 4 | Subject: [PATCH 4/5] wvcrash: Replace use of basename API |
| 5 | |
| 6 | musl does not have this API |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | --- |
| 10 | utils/wvcrash.cc | 2 +- |
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | |
| 13 | diff --git a/utils/wvcrash.cc b/utils/wvcrash.cc |
| 14 | index 0417759..3d160b7 100644 |
| 15 | --- a/utils/wvcrash.cc |
| 16 | +++ b/utils/wvcrash.cc |
| 17 | @@ -404,7 +404,7 @@ extern void __wvcrash_init_buffers(const char *program_name); |
| 18 | void wvcrash_setup(const char *_argv0, const char *_desc) |
| 19 | { |
| 20 | if (_argv0) |
| 21 | - argv0 = basename(_argv0); |
| 22 | + argv0 = strrchr(_argv0, '/') ? strrchr(_argv0, '/')+1 : _argv0; |
| 23 | __wvcrash_init_buffers(argv0); |
| 24 | if (_desc) |
| 25 | { |
| 26 | -- |
| 27 | 2.13.3 |
| 28 | |