#[link(name = "c")] extern { fn getpid() -> i32; } fn main() { let pid = unsafe{getpid()}; println!("pid = {pid}"); }