drm/xe: add missing include <libgen.h>
Subsystems (2)
PATCH 1/1 drm/xe: add missing include <libgen.h>
basename() got implicitly included on glibc but not on other libc's like musl libc and therefore fails to build:
/home/achill/git/user-aports/experimental/linux-mainline/src/linux-6.17-rc3/drivers/gpu/drm/xe/xe_gen_wa_oob.c: In function 'fn_to_prefix':/home/achill/git/user-aports/experimental/linux-mainline/src/linux-6.17-rc3/drivers/gpu/drm/xe/xe_gen_wa_oob.c:130:14: error: implicit declaration of function 'basename'; did you mean 'rename'? [-Wimplicit-function-declaration]
130 | fn = basename(fn);
| ^~~~~~~~
| rename/home/achill/git/user-aports/experimental/linux-mainline/src/linux-6.17-rc3/drivers/gpu/drm/xe/xe_gen_wa_oob.c:130:12: error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
130 | fn = basename(fn);
| ^
--- drivers/gpu/drm/xe/xe_gen_wa_oob.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/xe/xe_gen_wa_oob.c +1 -0
@@ -6,6 +6,7 @@#define _GNU_SOURCE#include <ctype.h> #include <errno.h> +#include <libgen.h> #include <stdbool.h> #include <stdio.h> #include <string.h>
Signature · 1 line
2.51.0
Patchwork
CI✗ LGCI.VerificationFailed: failure for drm/xe: add missing include <libgen.h>
== Series Details ==
== Series Details ==
Series: drm/xe: add missing include <libgen.h>
URL : https://patchwork.freedesktop.org/series/153441/
State : failure
== Summary ==
Address '[email protected]' is not on the allowlist, which prevents CI from being triggered for this patch. If you want Intel GFX CI to accept this address, please contact the script maintainers at [email protected]. Exception occurred during validation, bailing out!
Quoted 8 lines · Achill Gilgenast
basename()got implicitly included on glibc but not on other libc's like musl libc and therefore fails to build:
/home/achill/git/user-aports/experimental/linux-mainline/src/linux-6.17-rc3/drivers/gpu/drm/xe/xe_gen_wa_oob.c: In function 'fn_to_prefix':/home/achill/git/user-aports/experimental/linux-mainline/src/linux-6.17-rc3/drivers/gpu/drm/xe/xe_gen_wa_oob.c:130:14: error: implicit declaration of function 'basename'; did you mean 'rename'? [-Wimplicit-function-declaration]130 | fn = basename(fn); | ^~~~~~~~ | rename
Quoted 6 lines
/home/achill/git/user-aports/experimental/linux-mainline/src/linux-6.17-rc3/drivers/gpu/drm/xe/xe_gen_wa_oob.c:130:12: error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
130 | fn = basename(fn);
| ^Fixes b0a2ee5567ab ("drm/xe: prepare xe_gen_wa_oob to be multi-use")Signed-off-by Achill Gilgenast <[email protected]>
libgen.h provides a different basename than the one used here.
glibc defines it in string.h, but other libc's don't (or removed it
recently). See https://lore.kernel.org/intel-xe/w4j3kzezrd4xqc4q4vkpbbxqvqxitam5htkex6rj6dguj5kbw5@27gqnp6veuu4/
Lucas De Marchi