Skip to content

Commit b18b8eb

Browse files
committed
memfd_create is a glibc API, which is not present on uclibc
1 parent 82b85b7 commit b18b8eb

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,8 @@ extern "C" {
13331333
pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int;
13341334

13351335
pub fn sethostid(hostid: ::c_long) -> ::c_int;
1336+
1337+
pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int;
13361338
}
13371339

13381340
extern "C" {

src/unix/linux_like/linux/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3923,8 +3923,6 @@ extern "C" {
39233923
needlelen: ::size_t,
39243924
) -> *mut ::c_void;
39253925
pub fn sched_getcpu() -> ::c_int;
3926-
3927-
pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int;
39283926
}
39293927

39303928
cfg_if! {

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,8 @@ extern "C" {
770770
pub fn clock_adjtime(clk_id: ::clockid_t, buf: *mut ::timex) -> ::c_int;
771771

772772
pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char;
773+
774+
pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int;
773775
}
774776

775777
cfg_if! {

0 commit comments

Comments
 (0)