From: William Cohen Date: Wed, 6 Nov 2024 21:24:06 +0000 (-0500) Subject: Deal with kernels pre-6.12 kernel that relocated unaligned.h X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=3e5c0306ccaa277a6bcf189a26789825841a0402;p=systemtap.git Deal with kernels pre-6.12 kernel that relocated unaligned.h Observed on kernel-6.11.0-28.el10 the was moved to . The check was just looking at the kernel version which was not sufficient on this Linux 6.11 with a backport moving unaligned.h. --- diff --git a/buildrun.cxx b/buildrun.cxx index b08d06ed3..e5cb563b8 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -555,6 +555,9 @@ compile_pass (systemtap_session& s) output_autoconf(s, o, cs, "autoconf-files_lookup_fd_raw.c", "STAPCONF_FILES_LOOKUP_FD_RAW", NULL); output_autoconf(s, o, cs, "autoconf-task-state.c", "STAPCONF_TASK_STATE", NULL); + + output_autoconf(s, o, cs, "autoconf-linux-unaligned-h.c", "STAPCONF_LINUX_UNALIGNED_H", NULL); + // used by runtime/linux/netfilter.c output_exportconf(s, o2, "nf_register_hook", "STAPCONF_NF_REGISTER_HOOK"); diff --git a/runtime/linux/autoconf-linux-unaligned-h.c b/runtime/linux/autoconf-linux-unaligned-h.c new file mode 100644 index 000000000..6359283b3 --- /dev/null +++ b/runtime/linux/autoconf-linux-unaligned-h.c @@ -0,0 +1 @@ +#include diff --git a/runtime/sym.c b/runtime/sym.c index acae95818..a1a25f30e 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -18,7 +18,7 @@ #ifdef STP_NEED_LINE_DATA #include "unwind/unwind.h" #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0) +#ifdef STAPCONF_LINUX_UNALIGNED_H #include #else #include