]> sourceware.org Git - systemtap.git/commitdiff
Deal with kernels pre-6.12 kernel that relocated unaligned.h master
authorWilliam Cohen <wcohen@redhat.com>
Wed, 6 Nov 2024 21:24:06 +0000 (16:24 -0500)
committerWilliam Cohen <wcohen@redhat.com>
Wed, 6 Nov 2024 21:30:53 +0000 (16:30 -0500)
Observed on kernel-6.11.0-28.el10 the <asm/unaligned.h> was moved to
<linux/unaligned.h>.  The check was just looking at the kernel version
which was not sufficient on this Linux 6.11 with a backport moving
unaligned.h.

buildrun.cxx
runtime/linux/autoconf-linux-unaligned-h.c [new file with mode: 0644]
runtime/sym.c

index b08d06ed3a71b46c29f9ea41d7d90fe86278a601..e5cb563b820eae7d1acc29aa874461fa04958056 100644 (file)
@@ -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 (file)
index 0000000..6359283
--- /dev/null
@@ -0,0 +1 @@
+#include <linux/unaligned.h>
index acae95818d743f8d1ce346f115ed1e5d2ddc629c..a1a25f30ee707c9534cce9cfc9c52e056c41a2e7 100644 (file)
@@ -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 <linux/unaligned.h>
 #else
 #include <asm/unaligned.h>
This page took 0.033419 seconds and 5 git commands to generate.