Skip to content

Commit 40c1f31

Browse files
devnexentgross35
authored andcommitted
1 parent 3db74e3 commit 40c1f31

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

libc-test/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,6 +2853,9 @@ fn test_freebsd(target: &str) {
28532853
// FIXME(freebsd): Removed in FreeBSD 15, deprecated in libc
28542854
"TCP_PCAP_OUT" | "TCP_PCAP_IN" => true,
28552855

2856+
// Added in FreeBSD 14.2
2857+
"SO_SPLICE" if Some(14) > freebsd_ver => true,
2858+
28562859
_ => false,
28572860
}
28582861
});
@@ -2904,6 +2907,9 @@ fn test_freebsd(target: &str) {
29042907
// FIXME(freebsd): Changed in FreeBSD 15
29052908
"tcp_info" | "sockstat" if Some(15) >= freebsd_ver => true,
29062909

2910+
// `splice` introduced in FreeBSD 14.2
2911+
"splice" if Some(14) > freebsd_ver => true,
2912+
29072913
_ => false,
29082914
}
29092915
});

libc-test/semver/freebsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,6 +1466,7 @@ SO_PROTOTYPE
14661466
SO_REUSEPORT
14671467
SO_REUSEPORT_LB
14681468
SO_SETFIB
1469+
SO_SPLICE
14691470
SO_TIMESTAMP
14701471
SO_TS_BINTIME
14711472
SO_TS_CLOCK
@@ -2360,6 +2361,7 @@ sigwait
23602361
sigwaitinfo
23612362
sockaddr_dl
23622363
sockcred
2364+
splice
23632365
srand
23642366
srand48
23652367
stack_t

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,12 @@ s! {
13981398
tqh_first: *mut c_void,
13991399
tqh_last: *mut *mut c_void,
14001400
}
1401+
1402+
pub struct splice {
1403+
pub sp_fd: c_int,
1404+
pub sp_max: off_t,
1405+
pub sp_idle: crate::timeval,
1406+
}
14011407
}
14021408

14031409
s_no_extra_traits! {
@@ -3193,6 +3199,7 @@ pub const SO_PROTOCOL: c_int = 0x1016;
31933199
pub const SO_PROTOTYPE: c_int = SO_PROTOCOL;
31943200
pub const SO_TS_CLOCK: c_int = 0x1017;
31953201
pub const SO_DOMAIN: c_int = 0x1019;
3202+
pub const SO_SPLICE: c_int = 0x1023;
31963203
pub const SO_VENDOR: c_int = 0x80000000;
31973204

31983205
pub const SO_TS_REALTIME_MICRO: c_int = 0;

0 commit comments

Comments
 (0)