Skip to content

Commit 9bb32ae

Browse files
Skip checks for kvm_t and a few kinfo_proc struct fields
1 parent d02cbd2 commit 9bb32ae

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

libc-test/build.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,6 +1992,16 @@ fn test_freebsd(target: &str) {
19921992
}
19931993
});
19941994

1995+
cfg.skip_type(move |ty| {
1996+
match ty {
1997+
// the struct "__kvm" is quite tricky to bind so since we only use a pointer to it
1998+
// for now, it doesn't matter too much...
1999+
"kvm_t" => true,
2000+
2001+
_ => false,
2002+
}
2003+
});
2004+
19952005
cfg.skip_struct(move |ty| {
19962006
if ty.starts_with("__c_anonymous_") {
19972007
return true;
@@ -2085,6 +2095,17 @@ fn test_freebsd(target: &str) {
20852095
// a_un field is a union
20862096
("Elf32_Auxinfo", "a_un") => true,
20872097
("Elf64_Auxinfo", "a_un") => true,
2098+
2099+
// FIXME: structs too complicated to bind for now...
2100+
("kinfo_proc", "ki_paddr") => true,
2101+
("kinfo_proc", "ki_addr") => true,
2102+
("kinfo_proc", "ki_tracep") => true,
2103+
("kinfo_proc", "ki_textvp") => true,
2104+
("kinfo_proc", "ki_fd") => true,
2105+
("kinfo_proc", "ki_vmspace") => true,
2106+
("kinfo_proc", "ki_pcb") => true,
2107+
("kinfo_proc", "ki_tdaddr") => true,
2108+
("kinfo_proc", "ki_pd") => true,
20882109
_ => false,
20892110
}
20902111
});

0 commit comments

Comments
 (0)