[PATCH] drm/xe: add missing include <libgen.h>
Achill Gilgenast
achill at achill.org
Mon Aug 25 01:09:09 UTC 2025
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);
| ^
Fixes: b0a2ee5567ab ("drm/xe: prepare xe_gen_wa_oob to be multi-use")
Signed-off-by: Achill Gilgenast <achill at achill.org>
---
drivers/gpu/drm/xe/xe_gen_wa_oob.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/xe/xe_gen_wa_oob.c b/drivers/gpu/drm/xe/xe_gen_wa_oob.c
index 6581cb0f0e59..74af4b9fde65 100644
--- a/drivers/gpu/drm/xe/xe_gen_wa_oob.c
+++ b/drivers/gpu/drm/xe/xe_gen_wa_oob.c
@@ -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>
--
2.51.0
More information about the Intel-xe
mailing list