Skip to content

Fix undeclared identifier 'basename' build failure with musl libc

Markus Volk requested to merge (removed):flk-master-patch-53286 into master

'basename' is undeclared for cplusplus if using musl. Utilize g_path_get_basename instead for better portability.

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

Edited by Mike Fleetwood

Merge request reports