]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
bcachefs-tools: Use basename(3) from <libgen.h>
authorChris Webb <chris@arachsys.com>
Sat, 9 Dec 2023 12:58:46 +0000 (12:58 +0000)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 10 Dec 2023 04:25:00 +0000 (23:25 -0500)
Although glibc also provides basename(3) from <string.h>, this is
non-standard whereas it is available from <libgen.h> portably.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
libbcachefs.c

index 82f131cf483b99b14129b951a99d2b78cda18299..a3b9c30c555bf7c7c1a392ee04f0f3fc774d9119 100644 (file)
@@ -2,6 +2,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <libgen.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>