From 2098e4227bca59a46f19f817a6af1f52ea9a408e Mon Sep 17 00:00:00 2001 From: Michael Forney 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 --- 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 90c141acf380..b05ee9448e6a 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -6250,9 +6250,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.1