File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
src/unix/bsd/freebsdlike/freebsd Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2343,6 +2343,9 @@ fn test_freebsd(target: &str) {
23432343 // Added in FreeBSD 13.2
23442344 "AT_USRSTACKBASE" | "AT_USRSTACKLIM" if Some ( 13 ) > freebsd_ver => true ,
23452345
2346+ // Added in FreeBSD 14
2347+ "TFD_CLOEXEC" | "TFD_NONBLOCK" if Some ( 14 ) > freebsd_ver => true ,
2348+
23462349 _ => false ,
23472350 }
23482351 } ) ;
@@ -2441,6 +2444,11 @@ fn test_freebsd(target: &str) {
24412444 true
24422445 }
24432446
2447+ // Those are introduced in FreeBSD 14.
2448+ "timerfd_create" | "timerfd_gettime" | "timerfd_settime" if Some ( 14 ) > freebsd_ver => {
2449+ true
2450+ }
2451+
24442452 _ => false ,
24452453 }
24462454 } ) ;
Original file line number Diff line number Diff line change @@ -4693,6 +4693,11 @@ pub const RB_POWERCYCLE: ::c_int = 0x400000;
46934693pub const RB_PROBE : :: c_int = 0x10000000 ;
46944694pub const RB_MULTIPLE : :: c_int = 0x20000000 ;
46954695
4696+ // sys/timerfd.h
4697+
4698+ pub const TFD_NONBLOCK : :: c_int = :: O_NONBLOCK ;
4699+ pub const TFD_CLOEXEC : :: c_int = O_CLOEXEC ;
4700+
46964701cfg_if ! {
46974702 if #[ cfg( libc_const_extern_fn) ] {
46984703 pub const fn MAP_ALIGNED ( a: :: c_int) -> :: c_int {
@@ -5406,6 +5411,15 @@ extern "C" {
54065411 infotype : * mut :: c_uint ,
54075412 flags : * mut :: c_int ,
54085413 ) -> :: ssize_t ;
5414+
5415+ pub fn timerfd_create ( clockid : :: c_int , flags : :: c_int ) -> :: c_int ;
5416+ pub fn timerfd_gettime ( fd : :: c_int , curr_value : * mut itimerspec ) -> :: c_int ;
5417+ pub fn timerfd_settime (
5418+ fd : :: c_int ,
5419+ flags : :: c_int ,
5420+ new_value : * const itimerspec ,
5421+ old_value : * mut itimerspec ,
5422+ ) -> :: c_int ;
54095423}
54105424
54115425#[ link( name = "memstat" ) ]
You can’t perform that action at this time.
0 commit comments