aboutsummaryrefslogtreecommitdiffstats
path: root/community/ceph/10-musl-fixes.patch
blob: 183097514b5bf8bd810e6c60cf4814ca18c9289c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

diff -Nurp a/src/tools/rbd_nbd/rbd-nbd.cc b/src/tools/rbd_nbd/rbd-nbd.cc
--- a/src/tools/rbd_nbd/rbd-nbd.cc      2020-11-21 08:06:35.834423310 +0000
+++ b/src/tools/rbd_nbd/rbd-nbd.cc      2020-11-21 08:21:12.067978842 +0000
@@ -576,7 +576,8 @@ private:
     for (unsigned i = 0; i < cmdline.size(); i++) {
       char *arg = &cmdline[i];
       if (i == 0) {
-        if (strcmp(basename(arg) , "rbd-nbd") != 0) {
+        const char *fname = strrchr(arg, '/');
+        if (strcmp(fname ? fname+1 : arg, "rbd-nbd") != 0) {
           return -EINVAL;
         }
       } else {