diff options
-rw-r--r-- | .cirrus.yml | 8 | ||||
-rw-r--r-- | libc-test/build.rs | 3 | ||||
-rw-r--r-- | libc-test/semver/android.txt | 1 | ||||
-rw-r--r-- | libc-test/semver/freebsd.txt | 7 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 8 | ||||
-rw-r--r-- | src/unix/linux_like/android/mod.rs | 2 |
6 files changed, 25 insertions, 4 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index d2102f1fa1..fb152bab0f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ task: name: nightly x86_64-unknown-freebsd-12 freebsd_instance: - image: freebsd-12-4-release-amd64 + image_family: freebsd-12-4 setup_script: - pkg install -y curl - curl https://sh.rustup.rs -sSf --output rustup.sh @@ -15,7 +15,7 @@ task: task: name: nightly x86_64-unknown-freebsd-13 freebsd_instance: - image: freebsd-13-1-release-amd64 + image_family: freebsd-13-1 setup_script: - pkg install -y curl - curl https://sh.rustup.rs -sSf --output rustup.sh @@ -29,9 +29,9 @@ task: task: name: nightly x86_64-unknown-freebsd-14 freebsd_instance: - image: freebsd-14-0-current-amd64-v20230114 + image_family: freebsd-14-0-snap setup_script: - - pkg install -y curl + - pkg install -y libnghttp2 curl - curl https://sh.rustup.rs -sSf --output rustup.sh - sh rustup.sh -y --default-toolchain nightly --profile=minimal - . $HOME/.cargo/env diff --git a/libc-test/build.rs b/libc-test/build.rs index 24dc7f8c3d..3ae740faf3 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1819,6 +1819,9 @@ fn test_android(target: &str) { // Added in API level 28, but some tests use level 24. "getrandom" => true, + // Added in API level 28, but some tests use level 24. + "syncfs" => true, + _ => false, } }); diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index a2a6c69713..72f90c8a3c 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -3530,6 +3530,7 @@ swapoff swapon symlink symlinkat +syncfs syscall sysconf sysinfo diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index a09f45136d..def9315d1d 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -1140,6 +1140,13 @@ SO_REUSEPORT SO_REUSEPORT_LB SO_SETFIB SO_TIMESTAMP +SO_TS_CLOCK +SO_TS_REALTIME_MICRO +SO_TS_BINTIME +SO_TS_REALTIME +SO_TS_MONOTONIC +SO_TS_DEFAULT +SO_TS_CLOCK_MAX SO_USELOOPBACK SO_USER_COOKIE SO_VENDOR diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 27caa93608..0342fb57cf 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -2313,9 +2313,17 @@ pub const SO_SETFIB: ::c_int = 0x1014; pub const SO_USER_COOKIE: ::c_int = 0x1015; pub const SO_PROTOCOL: ::c_int = 0x1016; pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL; +pub const SO_TS_CLOCK: ::c_int = 0x1017; pub const SO_DOMAIN: ::c_int = 0x1019; pub const SO_VENDOR: ::c_int = 0x80000000; +pub const SO_TS_REALTIME_MICRO: ::c_int = 0; +pub const SO_TS_BINTIME: ::c_int = 1; +pub const SO_TS_REALTIME: ::c_int = 2; +pub const SO_TS_MONOTONIC: ::c_int = 3; +pub const SO_TS_DEFAULT: ::c_int = SO_TS_REALTIME_MICRO; +pub const SO_TS_CLOCK_MAX: ::c_int = SO_TS_MONOTONIC; + pub const LOCAL_CREDS: ::c_int = 2; pub const LOCAL_CREDS_PERSISTENT: ::c_int = 3; pub const LOCAL_CONNWAIT: ::c_int = 4; diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index 3337445496..2bc748ac4c 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -3510,6 +3510,8 @@ extern "C" { longopts: *const option, longindex: *mut ::c_int, ) -> ::c_int; + + pub fn syncfs(fd: ::c_int) -> ::c_int; } cfg_if! { |