aboutsummaryrefslogtreecommitdiffstats
path: root/meta-gnome/recipes-extended/gparted/files/0001-use-posix-basename.patch
blob: aae200e27ef0f85ae0fa4dc4372b7344cdba7e97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Subject: [PATCH] BCache_Info.cc: use posix basename

gnu 'basename' is undeclared for cplusplus if using musl. Use posix basename instead.

fdebug-prefix-map=TOPDIR/build/tmp/work/cortexa57-yoe-linux-musl/gparted/1.4.0-r0/
recipe-sysroot-native=-fvisibility-inlines-hidden  -c -o Dialog_Disklabel.o ../../
gparted-1.4.0/src/Dialog_Disklabel.cc ../../gparted-1.4.0/src/BCache_Info.cc:52:33:

error: use of undeclared identifier 'basename'; did you mean 'g_basename'?
        return "/dev/" + Glib::ustring(basename(buf));
                                       ^~~~~~~~
                                       g_basename

Signed-off-by: Markus Volk <f_l_k@t-online.de>

Upstream-Status: Submitted

https://gitlab.gnome.org/GNOME/gparted/-/merge_requests/99

--- a/src/BCache_Info.cc	2022-03-02 22:04:17.000000000 +0100
+++ b/src/BCache_Info.cc	2022-04-09 15:02:56.932218665 +0200
@@ -17,7 +17,7 @@
 
 #include "BCache_Info.h"
 
-#include <string.h>  // GNU version of basename()
+#include <libgen.h>  // POSIX version of basename()
 #include <unistd.h>
 #include <glibmm/ustring.h>
 #include <glibmm/fileutils.h>