Skip to content

Commit 97ac38e

Browse files
Add devstat items
1 parent cc44550 commit 97ac38e

File tree

2 files changed

+368
-1
lines changed

2 files changed

+368
-1
lines changed

libc-test/build.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,6 +1876,7 @@ fn test_freebsd(target: &str) {
18761876
"sys/vmmeter.h",
18771877
"sys/wait.h",
18781878
"libprocstat.h",
1879+
"devstat.h",
18791880
"syslog.h",
18801881
"termios.h",
18811882
"time.h",
@@ -1918,7 +1919,9 @@ fn test_freebsd(target: &str) {
19181919
}
19191920
// Field is named `type` in C but that is a Rust keyword,
19201921
// so these fields are translated to `type_` in the bindings.
1921-
"type_" if struct_ == "rtprio" || struct_ == "sockstat" => "type".to_string(),
1922+
"type_" if struct_ == "rtprio" => "type".to_string(),
1923+
"type_" if struct_ == "sockstat" => "type".to_string(),
1924+
"type_" if struct_ == "devstat_match_table" => "type".to_string(),
19221925
s => s.to_string(),
19231926
}
19241927
});
@@ -2172,6 +2175,10 @@ fn test_freebsd(target: &str) {
21722175
// https://github.com/gnzlbg/ctest/issues/68
21732176
"lio_listio" => true,
21742177

2178+
// It returns a `long double`, but it's a nightmare to bind correctly in rust
2179+
// for the moment, so it's a best effort thing...
2180+
"devstat_compute_etime" => true,
2181+
21752182
_ => false,
21762183
}
21772184
});
@@ -2244,6 +2251,11 @@ fn test_freebsd(target: &str) {
22442251

22452252
// `__sem_base` is a private struct field
22462253
("semid_ds", "__sem_base") => true,
2254+
2255+
// `snap_time` is a `long double`, but it's a nightmare to bind correctly in rust
2256+
// for the moment, so it's a best effort thing...
2257+
("statinfo", "snap_time") => true,
2258+
22472259
_ => false,
22482260
}
22492261
});

0 commit comments

Comments
 (0)