diff -Nurp a/lib/xnvme_be_linux_nvme.c b/lib/xnvme_be_linux_nvme.c
--- a/lib/xnvme_be_linux_nvme.c	2024-09-11 11:56:13.000000000 +0000
+++ b/lib/xnvme_be_linux_nvme.c	2024-09-14 09:12:37.198486113 +0000
@@ -18,6 +18,9 @@
 #include <xnvme_be_linux.h>
 #include <xnvme_be_linux_nvme.h>
 #include <xnvme_spec.h>
+#if defined(__linux__) && !defined(__GLIBC__)
+#include "libgen.h" // for basename
+#endif
 
 #ifdef XNVME_DEBUG_ENABLED
 static const char *
