]> git.proxmox.com Git - cargo.git/commitdiff
Don't hardcode i32 in FFI bindings
authorAlex Crichton <alex@alexcrichton.com>
Mon, 13 Oct 2014 16:44:58 +0000 (09:44 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 13 Oct 2014 16:44:58 +0000 (09:44 -0700)
src/doc/native-build.md

index 60a169487eeb724178e1475bdcf4e9514778f117..740a4273cc6db25c2320abee05f80d3144ac0938 100644 (file)
@@ -127,10 +127,11 @@ int foo() { return 1; }
 
 ```rust
 // src/main.rs
+extern crate libc;
 
 #[link(name = "hello", kind = "static")]
 extern {
-    fn foo() -> i32;
+    fn foo() -> libc::c_int;
 }
 
 fn main() {