2024-04-17 17:47:28 -05:00
|
|
|
use std::ffi::c_int;
|
2014-09-04 15:41:00 -05:00
|
|
|
|
2020-09-01 16:12:52 -05:00
|
|
|
#[link(name = "foo", kind = "static")]
|
|
|
|
extern "C" {
|
2024-04-17 17:47:28 -05:00
|
|
|
fn should_return_one() -> c_int;
|
2014-09-04 15:41:00 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2020-09-01 16:12:52 -05:00
|
|
|
let result = unsafe { should_return_one() };
|
2014-09-04 15:41:00 -05:00
|
|
|
|
|
|
|
if result != 1 {
|
2015-08-11 19:27:05 -05:00
|
|
|
std::process::exit(255);
|
2014-09-04 15:41:00 -05:00
|
|
|
}
|
|
|
|
}
|