summaryrefslogtreecommitdiff
path: root/pkg/iproute2/patch/0016-Make-struct-bpf_timer-include-a-named-member.patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-12-04 00:55:33 -0800
committerMichael Forney <mforney@mforney.org>2021-12-22 00:15:18 -0800
commitc0783c3e639313e7a027fb754ff1c44c824d0ee9 (patch)
treec1cff2368d5d8957bd36d039de2146e9950ed8f5 /pkg/iproute2/patch/0016-Make-struct-bpf_timer-include-a-named-member.patch
parentd88d1365e6dd40e8dc5185485e6d058817683b31 (diff)
iproute2: Update to 5.15.0
Diffstat (limited to 'pkg/iproute2/patch/0016-Make-struct-bpf_timer-include-a-named-member.patch')
-rw-r--r--pkg/iproute2/patch/0016-Make-struct-bpf_timer-include-a-named-member.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkg/iproute2/patch/0016-Make-struct-bpf_timer-include-a-named-member.patch b/pkg/iproute2/patch/0016-Make-struct-bpf_timer-include-a-named-member.patch
new file mode 100644
index 00000000..8829b7a2
--- /dev/null
+++ b/pkg/iproute2/patch/0016-Make-struct-bpf_timer-include-a-named-member.patch
@@ -0,0 +1,32 @@
+From 37ed0cb1540616327c82760f921b4846b6789bfc Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Thu, 2 Dec 2021 14:49:08 -0800
+Subject: [PATCH] Make struct bpf_timer include a named member
+
+A struct without any named members is undefined behavior by C11
+6.7.2.1p8.
+
+Signed-off-by: Michael Forney <mforney@mforney.org>
+---
+ include/uapi/linux/bpf.h | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
+index 262001e4..6884f5f2 100644
+--- a/include/uapi/linux/bpf.h
++++ b/include/uapi/linux/bpf.h
+@@ -6180,9 +6180,8 @@ struct bpf_spin_lock {
+ };
+
+ struct bpf_timer {
+- __u64 :64;
+- __u64 :64;
+-} __attribute__((aligned(8)));
++ __u64 reserved[2];
++};
+
+ struct bpf_sysctl {
+ __u32 write; /* Sysctl is being read (= 0) or written (= 1).
+--
+2.34.0
+