fix for musl 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 {