Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.2] Backports #3975

Merged
merged 5 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}