From d44a6a9b960e0abad7cce8206fd5e72426ecd554 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Thu, 2 Oct 2025 23:36:27 -0400 Subject: [PATCH] ebpf: use null pointers at runtime The values here do not matter, this is just to get type information. --- ebpf/aya-ebpf/src/btf_maps/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ebpf/aya-ebpf/src/btf_maps/mod.rs b/ebpf/aya-ebpf/src/btf_maps/mod.rs index e02afdbc..c0079c72 100644 --- a/ebpf/aya-ebpf/src/btf_maps/mod.rs +++ b/ebpf/aya-ebpf/src/btf_maps/mod.rs @@ -40,11 +40,11 @@ macro_rules! btf_map_def { impl $name { pub const fn new() -> $name { $name { - r#type: &[0i32; $t as usize], + r#type: ::core::ptr::null(), key: ::core::ptr::null(), value: ::core::ptr::null(), - max_entries: &[0i32; M], - map_flags: &[0i32; F], + max_entries: ::core::ptr::null(), + map_flags: ::core::ptr::null(), _anon: $crate::btf_maps::AyaBtfMapMarker::new(), } }