]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tools/rbd_nbd: use POSIX basename() 28856/head
authorKefu Chai <kchai@redhat.com>
Wed, 3 Jul 2019 04:52:15 +0000 (12:52 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Jul 2019 07:13:17 +0000 (15:13 +0800)
commitf33119e699caaf4f2f0c15f54b29c68791643ce1
tree53dee03e8856d6b0abdb94088f06edabcbfcb1c8
parentbeb0c343b3f18297b09ddc61b0c2e0156f109455
tools/rbd_nbd: use POSIX basename()

* glibc offers two variants of basename(). one modifies the content of
  `path`, the other does not. to be standard compliant, and to fix
  the FTBFS with musl-libc, we need to use the POSIX variant.
* #include <libgen.h> for basename(3), the POSIX compliant one.

see
http://pubs.opengroup.org/onlinepubs/009695399/functions/basename.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/rbd_nbd/rbd-nbd.cc