[PATCH kvmtool 1/2] Get basename() from <libgen.h> for musl compat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to the manpage, basename is defined in <libgen.h>.
Not including it results in a compilation failure on musl-libc:

vfio/core.c:538:22: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration]
  538 |         group_name = basename(group_path);
      |                      ^~~~~~~~

Signed-off-by: J. Neuschäfer <j.neuschaefer@xxxxxxx>
---
 vfio/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vfio/core.c b/vfio/core.c
index 3ff2c0b..8f88489 100644
--- a/vfio/core.c
+++ b/vfio/core.c
@@ -3,6 +3,7 @@
 #include "kvm/ioport.h"

 #include <linux/list.h>
+#include <libgen.h>

 #define VFIO_DEV_DIR		"/dev/vfio"
 #define VFIO_DEV_NODE		VFIO_DEV_DIR "/vfio"

--
2.43.0






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux