Skip to content

Instantly share code, notes, and snippets.

@chanwit
Last active March 8, 2016 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chanwit/000a0296fa718ea47b6c to your computer and use it in GitHub Desktop.
Save chanwit/000a0296fa718ea47b6c to your computer and use it in GitHub Desktop.
extern {
fn seccomp_syscall_resolve_name_arch(arch: libc::uint32_t,
name: *const libc::c_char)
-> libc::c_int;
}
let c_str = CString::new(name).unwrap();
let result: libc::c_int = unsafe {
seccomp_syscall_resolve_name_arch(arch.to_native(), c_str.as_ptr())
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment