keep openbsd name for dirent field member

This commit is contained in:
Sébastien Marie 2015-12-23 18:54:25 +01:00
parent 6b847426de
commit 6c8a63a9e2
2 changed files with 2 additions and 3 deletions

View File

@ -213,8 +213,7 @@ fn main() {
let target2 = target.clone();
cfg.field_name(move |struct_, field| {
match field {
"d_namelen" if openbsd && struct_ == "dirent" => "d_namlen".to_string(),
"st_birthtime" if openbsd && struct_ == "stat" => "__st_birthtime".to_string(),
"st_birthtime" if openbsd && struct_ == "stat" => "__st_birthtime".to_string(),
"st_birthtime_nsec" if openbsd && struct_ == "stat" => "__st_birthtimensec".to_string(),
// Our stat *_nsec fields normally don't actually exist but are part
// of a timeval struct

View File

@ -17,7 +17,7 @@ s! {
pub d_off: ::off_t,
pub d_reclen: u16,
pub d_type: u8,
pub d_namelen: u8,
pub d_namlen: u8,
__d_padding: [u8; 4],
pub d_name: [::c_char; 256],
}