[PATCH 12/12] scripts/kallsyms: add compatibility support for macos
Daniel Gomez via B4 Relay
devnull+da.gomez.samsung.com at kernel.org
Tue Aug 6 23:09:26 UTC 2024
From: Daniel Gomez <da.gomez at samsung.com>
Commit 67bf347ba924 ("kbuild: remove PROVIDE() for kallsyms symbols")
introduces the use of scripts/kallsyms with /dev/null as input to
generate the kernel symbols file. This results in getline() returning
ENOTTY as the errno value on macOS hosts. To handle this different
behavior, add a specific #ifdef condition for macOS.
Fixes:
+ scripts/kallsyms --base-relative /dev/null
read_symbol: Inappropriate ioctl for device
make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
make: *** [Makefile:1172: vmlinux] Error 2
Signed-off-by: Daniel Gomez <da.gomez at samsung.com>
---
scripts/kallsyms.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 0ed873491bf5..cb200120a072 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -130,7 +130,11 @@ static struct sym_entry *read_symbol(FILE *in, char **buf, size_t *buf_len)
errno = 0;
readlen = getline(buf, buf_len, in);
if (readlen < 0) {
+#ifndef __APPLE__
if (errno) {
+#else
+ if (errno && errno != ENOTTY) {
+#endif
perror("read_symbol");
exit(EXIT_FAILURE);
}
--
Git-146)
More information about the Intel-xe
mailing list