Patrick Williams | 5877637 | 2022-04-13 09:07:35 -0500 | [diff] [blame] | 1 | Subject: [PATCH] BCache_Info.cc: use posix basename |
| 2 | |
| 3 | gnu 'basename' is undeclared for cplusplus if using musl. Use posix basename instead. |
| 4 | |
| 5 | fdebug-prefix-map=TOPDIR/build/tmp/work/cortexa57-yoe-linux-musl/gparted/1.4.0-r0/ |
| 6 | recipe-sysroot-native=-fvisibility-inlines-hidden -c -o Dialog_Disklabel.o ../../ |
| 7 | gparted-1.4.0/src/Dialog_Disklabel.cc ../../gparted-1.4.0/src/BCache_Info.cc:52:33: |
| 8 | |
| 9 | error: use of undeclared identifier 'basename'; did you mean 'g_basename'? |
| 10 | return "/dev/" + Glib::ustring(basename(buf)); |
| 11 | ^~~~~~~~ |
| 12 | g_basename |
| 13 | |
| 14 | Signed-off-by: Markus Volk <f_l_k@t-online.de> |
| 15 | |
| 16 | Upstream-Status: Submitted |
| 17 | |
| 18 | https://gitlab.gnome.org/GNOME/gparted/-/merge_requests/99 |
| 19 | |
| 20 | --- a/src/BCache_Info.cc 2022-03-02 22:04:17.000000000 +0100 |
| 21 | +++ b/src/BCache_Info.cc 2022-04-09 15:02:56.932218665 +0200 |
| 22 | @@ -17,7 +17,7 @@ |
| 23 | |
| 24 | #include "BCache_Info.h" |
| 25 | |
| 26 | -#include <string.h> // GNU version of basename() |
| 27 | +#include <libgen.h> // POSIX version of basename() |
| 28 | #include <unistd.h> |
| 29 | #include <glibmm/ustring.h> |
| 30 | #include <glibmm/fileutils.h> |