1 pub type c_char = i8;
2 pub type c_long = i32;
3 pub type c_ulong = u32;
4 pub type time_t = i32;
5 pub type suseconds_t = i32;
6 
7 s! {
8     pub struct stat {
9         pub st_dev: ::dev_t,
10         pub st_ino: ::ino_t,
11         pub st_mode: ::mode_t,
12         pub st_nlink: ::nlink_t,
13         pub st_uid: ::uid_t,
14         pub st_gid: ::gid_t,
15         pub st_rdev: ::dev_t,
16         pub st_atime: ::time_t,
17         pub st_atime_nsec: ::c_long,
18         pub st_mtime: ::time_t,
19         pub st_mtime_nsec: ::c_long,
20         pub st_ctime: ::time_t,
21         pub st_ctime_nsec: ::c_long,
22         pub st_size: ::off_t,
23         pub st_blocks: ::blkcnt_t,
24         pub st_blksize: ::blksize_t,
25         pub st_flags: ::fflags_t,
26         pub st_gen: u32,
27         pub st_lspare: i32,
28         pub st_birthtime: ::time_t,
29         pub st_birthtime_nsec: ::c_long,
30         __unused: [u8; 8],
31     }
32 }
33 
34 // should be pub(crate), but that requires Rust 1.18.0
35 cfg_if! {
36     if #[cfg(libc_const_size_of)] {
37         #[doc(hidden)]
38         pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
39     } else {
40         #[doc(hidden)]
41         pub const _ALIGNBYTES: usize = 8 - 1;
42     }
43 }
44