Skip to content

Commit

Permalink
Merge pull request #3975 from tgross35/backport-raddish
Browse files Browse the repository at this point in the history
[0.2] Backports
  • Loading branch information
tgross35 authored Oct 16, 2024
2 parents f4f1ae9 + c185415 commit c49fe92
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ task:
- name: nightly freebsd-14
freebsd_instance:
image: freebsd-14-0-release-amd64-ufs
- name: nightly freebsd-15
freebsd_instance:
image_family: freebsd-15-0-snap
# Temporarily disable CI on FreeBSD 15.0-CURRENT until the libmd solib
# fallout is cleaned up.
# FIXME https://github.com/rust-lang/libc/issues/3967
# https://github.com/rust-lang/libc/issues/3967
#- name: nightly freebsd-15
# freebsd_instance:
# image_family: freebsd-15-0-snap
setup_script:
- pkg install -y libnghttp2 curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
Expand Down
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4834,6 +4834,7 @@ fn test_haiku(target: &str) {
"libutil.h",
"link.h",
"pty.h",
"stdlib.h",
"stringlist.h",
"sys/link_elf.h",
}
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ F_SPECULATIVE_READ
F_TEST
F_THAW_FS
F_TLOCK
F_TRANSFEREXTENTS
F_TRIM_ACTIVE_FILE
F_ULOCK
F_UNLCK
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ getloadavg
lio_listio
ntptimeval
open_wmemstream
posix_spawn_file_actions_addchdir_np
posix_spawn_file_actions_addfchdir_np
preadv2
preadv64
prlimit
Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3618,6 +3618,7 @@ pub const F_PUNCHHOLE: ::c_int = 99;
pub const F_TRIM_ACTIVE_FILE: ::c_int = 100;
pub const F_SPECULATIVE_READ: ::c_int = 101;
pub const F_GETPATH_NOFIRMLINK: ::c_int = 102;
pub const F_TRANSFEREXTENTS: ::c_int = 110;

pub const F_ALLOCATECONTIG: ::c_uint = 0x02;
pub const F_ALLOCATEALL: ::c_uint = 0x04;
Expand Down
4 changes: 4 additions & 0 deletions src/unix/haiku/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2133,6 +2133,10 @@ extern "C" {
>,
data: *mut ::c_void,
) -> ::c_int;

pub fn arc4random() -> u32;
pub fn arc4random_uniform(upper_bound: u32) -> u32;
pub fn arc4random_buf(buf: *mut ::c_void, n: ::size_t);
}

#[link(name = "gnu")]
Expand Down
11 changes: 11 additions & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,17 @@ extern "C" {

pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;

// Added in `musl` 1.1.24
pub fn posix_spawn_file_actions_addchdir_np(
actions: *mut ::posix_spawn_file_actions_t,
path: *const ::c_char,
) -> ::c_int;
// Added in `musl` 1.1.24
pub fn posix_spawn_file_actions_addfchdir_np(
actions: *mut ::posix_spawn_file_actions_t,
fd: ::c_int,
) -> ::c_int;
}

// Alias <foo> to <foo>64 to mimic glibc's LFS64 support
Expand Down
2 changes: 2 additions & 0 deletions src/unix/newlib/rtems/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,7 @@ extern "C" {
clock_id: ::clockid_t,
) -> ::c_int;

pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;

pub fn setgroups(ngroups: ::c_int, grouplist: *const ::gid_t) -> ::c_int;
}

0 comments on commit c49fe92

Please sign in to comment.