Skip to content

Commit f63ecfc

Browse files
committed
Auto merge of #2892 - devnexen:fbsd_shmlargepage_conf, r=JohnTitor
freebsd add shm_largepage_conf data and its ioctl request.
2 parents a5553c2 + f7dc112 commit f63ecfc

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

libc-test/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,6 +2148,9 @@ fn test_freebsd(target: &str) {
21482148
// Added in FreeBSD 14
21492149
"LIO_READV" | "LIO_WRITEV" | "LIO_VECTORED" if Some(14) > freebsd_ver => true,
21502150

2151+
// Added in FreeBSD 13
2152+
"FIOSSHMLPGCNF" if Some(13) > freebsd_ver => true,
2153+
21512154
_ => false,
21522155
}
21532156
});
@@ -2178,6 +2181,8 @@ fn test_freebsd(target: &str) {
21782181

21792182
// `sockcred2` is not available in FreeBSD 12.
21802183
"sockcred2" if Some(13) > freebsd_ver => true,
2184+
// `shm_largepage_conf` was introduced in FreeBSD 13.
2185+
"shm_largepage_conf" if Some(13) > freebsd_ver => true,
21812186

21822187
_ => false,
21832188
}

libc-test/semver/freebsd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ FIONWRITE
341341
FIOSEEKDATA
342342
FIOSEEKHOLE
343343
FIOSETOWN
344+
FIOSSHMLPGCNF
344345
FLUSHO
345346
FOPEN_MAX
346347
F_DUP2FD

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,12 @@ s! {
992992
pub _flags: u32,
993993
pub _clockid: u32,
994994
}
995+
996+
pub struct shm_largepage_conf {
997+
pub psind: ::c_int,
998+
pub alloc_policy: ::c_int,
999+
__pad: [::c_int; 10],
1000+
}
9951001
}
9961002

9971003
s_no_extra_traits! {
@@ -2254,6 +2260,7 @@ pub const FIONWRITE: ::c_ulong = 0x40046677;
22542260
pub const FIONSPACE: ::c_ulong = 0x40046676;
22552261
pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;
22562262
pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662;
2263+
pub const FIOSSHMLPGCNF: ::c_ulong = 0x80306664;
22572264

22582265
pub const JAIL_API_VERSION: u32 = 2;
22592266
pub const JAIL_CREATE: ::c_int = 0x01;

0 commit comments

Comments
 (0)