On Sat, Jul 27, 2024 at 12:58:37PM +0200, Alyssa Ross wrote: > On Sat, Jul 27, 2024 at 10:11:14AM GMT, J. Neuschäfer wrote: > > According to the manpage, basename is defined in <libgen.h>. > > Not including it results in a compilation failure on musl-libc: > > That's not quite what the man page says — there are two versions of > basename, the POSIX version and the GNU version, with differing > behaviour. Right, thanks for catching that! > > vfio/core.c:538:22: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] > > 538 | group_name = basename(group_path); > > | ^~~~~~~~ > > In this case, it should be safe to switch to the POSIX version, because > group_path is writeable and not used after this, so > > Reviewed-by: Alyssa Ross <hi@xxxxxxxxx> > > but it would be nicer if the commit message was clearer, because it > currently reads like it's just including a missing header, rather than > changing the behaviour of the function. I'll update and respin. -- jn
Attachment:
signature.asc
Description: PGP signature