SHA256
1
0
forked from pool/systemtap
systemtap/get-shm_flag-defines-from-the-appropriate-include-file-for-linux-6.8-kernel.patch

42 lines
1.3 KiB
Diff
Raw Normal View History

From: William Cohen <wcohen@redhat.com>
Date: Tue Feb 20 09:22:34 2024 -0500
Subject: Get SHM_* flag defines from the appropriate include file for Linux 6.8 kernel
Git-commit: 8a9097d906867d364bc94f9c1552f240ca609422
References: bsc#1222249
Signed-off-by: Tony Jones <tonyj@suse.de>
Get SHM_* flag defines from the appropriate include file for Linux 6.8 kernels
Linux git commit bc46ef3cea3d6f6 removed the include/uapi/linux/shm.h
from include/linux/shm.h. For the newer Linux 6.8 kernels need to get
SHM_* defines directly from include/uapi/linux/shm.h.
diff --git a/tapset/linux/aux_syscalls.stp b/tapset/linux/aux_syscalls.stp
index e773ba7c2..fa915af8f 100644
--- a/tapset/linux/aux_syscalls.stp
+++ b/tapset/linux/aux_syscalls.stp
@@ -3405,7 +3405,11 @@ function _dup3_flag_str:string(f:long)
%}
%{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,8,0)
#include <linux/shm.h>
+#else
+#include <uapi/linux/shm.h>
+#endif
static const _stp_val_array _stp_shmat_list[] = {
V(SHM_RDONLY),
V(SHM_RND),
@@ -4149,7 +4153,11 @@ CATCH_DEREF_FAULT();
%{
#include <linux/ipc.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,8,0)
#include <linux/shm.h>
+#else
+#include <uapi/linux/shm.h>
+#endif
static const _stp_val_array _stp_shmget_flags_list[] = {
V(IPC_CREAT),
V(IPC_EXCL),