From 0fb363c62aed39b2b8663dc2ae91a89daa6ae37e Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 23 Oct 2024 06:38:45 +0100 Subject: [PATCH] freebsd adding CLOSE_RANGE_CLOEXEC flag --- libc-test/semver/freebsd.txt | 1 + src/unix/bsd/freebsdlike/freebsd/mod.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index e234856b73df0..1ff411984787e 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -264,6 +264,7 @@ CLOCK_UPTIME CLOCK_UPTIME_FAST CLOCK_UPTIME_PRECISE CLOCK_VIRTUAL +CLOSE_RANGE_CLOEXEC CMGROUP_MAX CMSG_DATA CMSG_FIRSTHDR diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 33cc79668ec2c..037bf74af5eda 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -4906,6 +4906,10 @@ pub const KCMP_FILES: ::c_int = 102; pub const KCMP_SIGHAND: ::c_int = 103; pub const KCMP_VM: ::c_int = 104; +// sys/unistd.h + +pub const CLOSE_RANGE_CLOEXEC: ::c_uint = 1 << 2; + pub const fn MAP_ALIGNED(a: ::c_int) -> ::c_int { a << 24 }