diff options
author | gnzlbg <gonzalobg88@gmail.com> | 2018-01-18 17:16:33 +0100 |
---|---|---|
committer | gnzlbg <gonzalobg88@gmail.com> | 2018-01-18 17:16:33 +0100 |
commit | 9908dcea17fe179675a10f71b1ee30147c252d3e (patch) | |
tree | 19ac8b3b10d32bb9f7e51fd4cb585bb7290c36ec | |
parent | c91864394e06ad04ad2f0ac4abffac6ce115c122 (diff) | |
download | rust-libc-9908dcea17fe179675a10f71b1ee30147c252d3e.tar.gz |
move to linux::other
-rw-r--r-- | src/unix/notbsd/linux/mod.rs | 24 | ||||
-rw-r--r-- | src/unix/notbsd/linux/other/mod.rs | 17 |
2 files changed, 17 insertions, 24 deletions
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index c1b4dbcf1f..c2900de085 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -465,22 +465,6 @@ s! { } } -#[cfg(not(target_env = "musl"))] -s! { - pub struct mallinfo { - pub arena: ::c_int, - pub ordblks: ::c_int, - pub smblks: ::c_int, - pub hblks: ::c_int, - pub hblkhd: ::c_int, - pub usmblks: ::c_int, - pub fsmblks: ::c_int, - pub uordblks: ::c_int, - pub fordblks: ::c_int, - pub keepcost: ::c_int, - } -} - pub const ABDAY_1: ::nl_item = 0x20000; pub const ABDAY_2: ::nl_item = 0x20001; pub const ABDAY_3: ::nl_item = 0x20002; @@ -1379,10 +1363,6 @@ extern { len: ::off_t) -> ::c_int; pub fn readahead(fd: ::c_int, offset: ::off64_t, count: ::size_t) -> ::ssize_t; - #[cfg(not(target_env = "musl"))] - pub fn memfd_create(name: *const c_char, flags: ::c_uint) -> ::c_int; - #[cfg(not(target_env = "musl"))] - pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; pub fn getxattr(path: *const c_char, name: *const c_char, value: *mut ::c_void, size: ::size_t) -> ::ssize_t; pub fn lgetxattr(path: *const c_char, name: *const c_char, @@ -1501,10 +1481,6 @@ extern { nbytes: ::off64_t, flags: ::c_uint) -> ::c_int; pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; pub fn freeifaddrs(ifa: *mut ::ifaddrs); - #[cfg(not(target_env = "musl"))] - pub fn mallinfo() -> ::mallinfo; - #[cfg(not(target_env = "musl"))] - pub fn malloc_usable_size(ptr: *const ::c_void) -> ::size_t; pub fn mremap(addr: *mut ::c_void, len: ::size_t, new_len: ::size_t, diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index c256d5f498..96bfa1268a 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -165,6 +165,19 @@ s! { __size: [::c_char; 32], __align: [::c_long; 0], } + + pub struct mallinfo { + pub arena: ::c_int, + pub ordblks: ::c_int, + pub smblks: ::c_int, + pub hblks: ::c_int, + pub hblkhd: ::c_int, + pub usmblks: ::c_int, + pub fsmblks: ::c_int, + pub uordblks: ::c_int, + pub fordblks: ::c_int, + pub keepcost: ::c_int, + } } pub const __UT_LINESIZE: usize = 32; @@ -597,6 +610,10 @@ extern { pub fn pthread_rwlockattr_setkind_np(attr: *mut ::pthread_rwlockattr_t, val: ::c_int) -> ::c_int; pub fn sched_getcpu() -> ::c_int; + pub fn mallinfo() -> ::mallinfo; + pub fn malloc_usable_size(ptr: *const ::c_void) -> ::size_t; + pub fn memfd_create(name: *const c_char, flags: ::c_uint) -> ::c_int; + pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; } cfg_if! { |