btf: fix regression computing pointer sizes

Computing pointer sizes was broken in #285
pull/481/head
Alessandro Decina 2 years ago
parent 890e8c9340
commit 12e422b211

@ -1054,6 +1054,7 @@ impl BtfType {
BtfType::Struct(t) => Some(t.size), BtfType::Struct(t) => Some(t.size),
BtfType::Union(t) => Some(t.size), BtfType::Union(t) => Some(t.size),
BtfType::DataSec(t) => Some(t.size), BtfType::DataSec(t) => Some(t.size),
BtfType::Ptr(_) => Some(mem::size_of::<&()>() as u32),
_ => None, _ => None,
} }
} }

Loading…
Cancel
Save