1
0
Fork 0
mirror of https://gitlab.postmarketos.org/postmarketOS/pmaports.git synced 2025-07-21 13:55:55 +03:00
pmaports/extra-repos/systemd/multipath-tools/fix-basename.patch
2025-01-10 13:02:34 +01:00

14 lines
414 B
Diff

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index d809490..62154fd 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -43,6 +43,9 @@
#include "sysfs.h"
#include "io_err_stat.h"
+#define basename(dev) \
+ (strrchr((dev),'/') ? strrchr((dev),'/')+1 : (dev))
+
/* group paths in pg by host adapter
*/
int group_by_host_adapter(struct pathgroup *pgp, vector adapters)