Skip to content

Commit

Permalink
Merge pull request rust-lang#3843 from devnexen/gh3689
Browse files Browse the repository at this point in the history
Unix: add `aligned_alloc`
  • Loading branch information
tgross35 authored Aug 17, 2024
2 parents fc28283 + f136b30 commit e19650d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,9 @@ fn test_android(target: &str) {
// Added in API level 28, but some tests use level 24.
"fread_unlocked" | "fwrite_unlocked" | "fgets_unlocked" | "fflush_unlocked" => true,

// Added in API level 28, but some tests use level 24.
"aligned_alloc" => true,

// FIXME: bad function pointers:
"isalnum" | "isalpha" | "iscntrl" | "isdigit" | "isgraph" | "islower" | "isprint"
| "ispunct" | "isspace" | "isupper" | "isxdigit" | "isblank" | "tolower"
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/unix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ accept
access
addrinfo
alarm
aligned_alloc
atexit
atof
atoi
Expand Down
1 change: 1 addition & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ extern "C" {
pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long;
pub fn pipe(fds: *mut ::c_int) -> ::c_int;
pub fn posix_memalign(memptr: *mut *mut ::c_void, align: ::size_t, size: ::size_t) -> ::c_int;
pub fn aligned_alloc(alignment: ::size_t, size: ::size_t) -> *mut ::c_void;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "read$UNIX2003"
Expand Down

0 comments on commit e19650d

Please sign in to comment.