Put "use libc::*;" instead of "use std::libc::*;" at the top.