File tree 2 files changed +26
-0
lines changed
src/unix/bsd/freebsdlike/freebsd
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -2167,6 +2167,15 @@ fn test_freebsd(target: &str) {
2167
2167
2168
2168
// Added in FreeBSD 14.
2169
2169
"F_KINFO" => true , // FIXME: depends how frequent freebsd 14 is updated on CI, this addition went this week only.
2170
+ "SHM_RENAME_NOREPLACE"
2171
+ | "SHM_RENAME_EXCHANGE"
2172
+ | "MFD_CLOEXEC"
2173
+ | "MFD_ALLOW_SEALING"
2174
+ | "MFD_HUGETLB"
2175
+ if Some ( 13 ) > freebsd_ver =>
2176
+ {
2177
+ true
2178
+ }
2170
2179
2171
2180
_ => false ,
2172
2181
}
@@ -2248,6 +2257,9 @@ fn test_freebsd(target: &str) {
2248
2257
// This is not available in FreeBSD 12.
2249
2258
"SOCKCRED2SIZE" if Some ( 13 ) > freebsd_ver => true ,
2250
2259
2260
+ // Those are not available in FreeBSD 12.
2261
+ "memfd_create" | "shm_rename" if Some ( 13 ) > freebsd_ver => true ,
2262
+
2251
2263
_ => false ,
2252
2264
}
2253
2265
} ) ;
Original file line number Diff line number Diff line change @@ -3615,6 +3615,13 @@ pub const DST_CAN: ::c_int = 6;
3615
3615
pub const CPUCLOCK_WHICH_PID : :: c_int = 0 ;
3616
3616
pub const CPUCLOCK_WHICH_TID : :: c_int = 1 ;
3617
3617
3618
+ pub const MFD_CLOEXEC : :: c_uint = 0x00000001 ;
3619
+ pub const MFD_ALLOW_SEALING : :: c_uint = 0x00000002 ;
3620
+ pub const MFD_HUGETLB : :: c_uint = 0x00000004 ;
3621
+
3622
+ pub const SHM_RENAME_NOREPLACE : :: c_int = 1 << 0 ;
3623
+ pub const SHM_RENAME_EXCHANGE : :: c_int = 1 << 1 ;
3624
+
3618
3625
const_fn ! {
3619
3626
{ const } fn _ALIGN( p: usize ) -> usize {
3620
3627
( p + _ALIGNBYTES) & !_ALIGNBYTES
@@ -4155,6 +4162,13 @@ extern "C" {
4155
4162
4156
4163
pub fn adjtime ( arg1 : * const :: timeval , arg2 : * mut :: timeval ) -> :: c_int ;
4157
4164
pub fn clock_getcpuclockid2 ( arg1 : :: id_t , arg2 : :: c_int , arg3 : * mut clockid_t ) -> :: c_int ;
4165
+
4166
+ pub fn shm_rename (
4167
+ path_from : * const :: c_char ,
4168
+ path_to : * const :: c_char ,
4169
+ flags : :: c_int ,
4170
+ ) -> :: c_int ;
4171
+ pub fn memfd_create ( name : * const :: c_char , flags : :: c_uint ) -> :: c_int ;
4158
4172
}
4159
4173
4160
4174
#[ link( name = "kvm" ) ]
You can’t perform that action at this time.
0 commit comments