changed std::libc to libc and added extern crate libc