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