2018-08-30 12:18:55 +00:00
|
|
|
//@ run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(dead_code)]
|
2018-08-31 13:51:35 +00:00
|
|
|
#![allow(improper_ctypes)]
|
2012-10-10 20:40:17 +00:00
|
|
|
// Issue #3656
|
|
|
|
// Incorrect struct size computation in the FFI, because of not taking
|
|
|
|
// the alignment of elements into account.
|
|
|
|
|
2015-03-22 20:13:15 +00:00
|
|
|
//@ pretty-expanded FIXME #23616
|
2015-03-06 02:33:58 +00:00
|
|
|
|
2024-04-14 20:23:07 +00:00
|
|
|
use std::ffi::{c_uint, c_void};
|
2012-10-10 20:40:17 +00:00
|
|
|
|
2014-09-19 19:30:07 +00:00
|
|
|
pub struct KEYGEN {
|
2014-12-20 02:20:51 +00:00
|
|
|
hash_algorithm: [c_uint; 2],
|
2019-06-01 13:37:54 +00:00
|
|
|
count: u32,
|
2014-06-25 19:47:34 +00:00
|
|
|
salt: *const c_void,
|
2019-06-01 13:37:54 +00:00
|
|
|
salt_size: u32,
|
2012-10-10 20:40:17 +00:00
|
|
|
}
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
extern "C" {
|
2012-10-10 20:40:17 +00:00
|
|
|
// Bogus signature, just need to test if it compiles.
|
2013-05-08 04:33:31 +00:00
|
|
|
pub fn malloc(data: KEYGEN);
|
2012-10-10 20:40:17 +00:00
|
|
|
}
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
pub fn main() {}
|