File tree 2 files changed +22
-0
lines changed
src/unix/bsd/freebsdlike/freebsd
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2346,6 +2346,9 @@ fn test_freebsd(target: &str) {
2346
2346
// Added in FreeBSD 13.2
2347
2347
"AT_USRSTACKBASE" | "AT_USRSTACKLIM" if Some ( 13 ) > freebsd_ver => true ,
2348
2348
2349
+ // Added in FreeBSD 14
2350
+ "TFD_CLOEXEC" | "TFD_NONBLOCK" if Some ( 14 ) > freebsd_ver => true ,
2351
+
2349
2352
_ => false ,
2350
2353
}
2351
2354
} ) ;
@@ -2444,6 +2447,11 @@ fn test_freebsd(target: &str) {
2444
2447
true
2445
2448
}
2446
2449
2450
+ // Those are introduced in FreeBSD 14.
2451
+ "timerfd_create" | "timerfd_gettime" | "timerfd_settime" if Some ( 14 ) > freebsd_ver => {
2452
+ true
2453
+ }
2454
+
2447
2455
_ => false ,
2448
2456
}
2449
2457
} ) ;
Original file line number Diff line number Diff line change @@ -4695,6 +4695,11 @@ pub const RB_POWERCYCLE: ::c_int = 0x400000;
4695
4695
pub const RB_PROBE : :: c_int = 0x10000000 ;
4696
4696
pub const RB_MULTIPLE : :: c_int = 0x20000000 ;
4697
4697
4698
+ // sys/timerfd.h
4699
+
4700
+ pub const TFD_NONBLOCK : :: c_int = :: O_NONBLOCK ;
4701
+ pub const TFD_CLOEXEC : :: c_int = O_CLOEXEC ;
4702
+
4698
4703
cfg_if ! {
4699
4704
if #[ cfg( libc_const_extern_fn) ] {
4700
4705
pub const fn MAP_ALIGNED ( a: :: c_int) -> :: c_int {
@@ -5408,6 +5413,15 @@ extern "C" {
5408
5413
infotype : * mut :: c_uint ,
5409
5414
flags : * mut :: c_int ,
5410
5415
) -> :: ssize_t ;
5416
+
5417
+ pub fn timerfd_create ( clockid : :: c_int , flags : :: c_int ) -> :: c_int ;
5418
+ pub fn timerfd_gettime ( fd : :: c_int , curr_value : * mut itimerspec ) -> :: c_int ;
5419
+ pub fn timerfd_settime (
5420
+ fd : :: c_int ,
5421
+ flags : :: c_int ,
5422
+ new_value : * const itimerspec ,
5423
+ old_value : * mut itimerspec ,
5424
+ ) -> :: c_int ;
5411
5425
}
5412
5426
5413
5427
#[ link( name = "memstat" ) ]
You can’t perform that action at this time.
0 commit comments