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

adding aligned_alloc support for the following: #3698

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1836,6 +1836,7 @@ aio_return
aio_suspend
aio_write
aiocb
aligned_alloc
arc4random
arc4random_buf
arc4random_uniform
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/dragonfly.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,7 @@ aio_suspend
aio_waitcomplete
aio_write
aiocb
aligned_alloc
arc4random
arc4random_buf
arc4random_uniform
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,7 @@ aio_suspend
aio_waitcomplete
aio_write
aiocb
aligned_alloc
arc4random
arc4random_buf
arc4random_uniform
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ aio_return
aio_suspend
aio_write
aiocb
aligned_alloc
backtrace
clock_adjtime
copy_file_range
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ aio_return
aio_suspend
aio_write
aiocb
aligned_alloc
clock_adjtime
copy_file_range
ctermid
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ aio_return
aio_suspend
aio_write
aiocb
aligned_alloc
arc4random
arc4random_buf
arc4random_uniform
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/openbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ __errno
abs
accept4
acct
aligned_alloc
arc4random
arc4random_buf
arc4random_uniform
Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ extern "C" {
timeptr: *const ::tm,
locale: ::locale_t,
) -> ::size_t;
pub fn aligned_alloc(alignment: ::size_t, size: ::size_t) -> *mut ::c_void;
}

cfg_if! {
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,9 @@ extern "C" {

// Added in `glibc` 2.34
pub fn close_range(first: ::c_uint, last: ::c_uint, flags: ::c_int) -> ::c_int;

// Added in `glibc` 2.16
pub fn aligned_alloc(alignment: ::size_t, size: ::size_t) -> *mut ::c_void;
}

cfg_if! {
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ extern "C" {

pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
pub fn aligned_alloc(alignment: ::size_t, size: ::size_t) -> *mut ::c_void;
}

// Alias <foo> to <foo>64 to mimic glibc's LFS64 support
Expand Down
1 change: 1 addition & 0 deletions src/unix/solarish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3212,6 +3212,7 @@ extern "C" {
pub fn __major(version: ::c_int, devnum: ::dev_t) -> ::major_t;
pub fn __minor(version: ::c_int, devnum: ::dev_t) -> ::minor_t;
pub fn __makedev(version: ::c_int, majdev: ::major_t, mindev: ::minor_t) -> ::dev_t;
pub fn aligned_alloc(alignment: ::size_t, size: ::size_t) -> *mut ::c_void;
}

#[link(name = "sendfile")]
Expand Down
Loading