blob: 91af76ad4e5a10f3652bb149c6af2be678f6f390 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From e0e81fd6e3be7bd03fcf82cbb598253a9b7c47f8 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 864d6345ebc3..a2ac330e49bd 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -6688,9 +6688,8 @@ struct bpf_spin_lock {
};
struct bpf_timer {
- __u64 :64;
- __u64 :64;
-} __attribute__((aligned(8)));
+ __u64 reserved[2];
+};
struct bpf_dynptr {
__u64 :64;
--
2.35.1
|