+ self.eval_libc(name).to_i32().unwrap_or_else(|_err| {
+ panic!("required libc item has unexpected type (not `i32`): {name}")
+ })
+ }
+
+ /// Helper function to get a `libc` constant as an `u32`.
+ fn eval_libc_u32(&self, name: &str) -> u32 {
+ // TODO: Cache the result.
+ self.eval_libc(name).to_u32().unwrap_or_else(|_err| {
+ panic!("required libc item has unexpected type (not `u32`): {name}")
+ })