summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Hejna <josh.hejna@gmail.com>2018-09-02 01:56:00 -0700
committerJosh Hejna <josh.hejna@gmail.com>2018-09-02 01:56:00 -0700
commita9590b55905c5f07c415c23e85a79d2259354482 (patch)
treebd3ff5b1a4fe70dfc2eb9288a8f31e84b0587767
parent7192ecb2cd9b75a43f4ce8463526a04f8df9b944 (diff)
downloadrust-libc-a9590b55905c5f07c415c23e85a79d2259354482.tar.gz
Move mallopt to exclude from musl
-rw-r--r--src/unix/notbsd/linux/mod.rs15
-rw-r--r--src/unix/notbsd/linux/other/mod.rs14
2 files changed, 14 insertions, 15 deletions
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 9f28dfd6ca..6bc7db191c 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -1576,20 +1576,6 @@ pub const ATF_MAGIC: ::c_int = 0x80;
pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001;
pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002;
-// malloc.h
-pub const M_MXFAST: ::c_int = 1;
-pub const M_NLBLKS: ::c_int = 2;
-pub const M_GRAIN: ::c_int = 3;
-pub const M_KEEP: ::c_int = 4;
-pub const M_TRIM_THRESHOLD: ::c_int = -1;
-pub const M_TOP_PAD: ::c_int = -2;
-pub const M_MMAP_THRESHOLD: ::c_int = -3;
-pub const M_MMAP_MAX: ::c_int = -4;
-pub const M_CHECK_ACTION: ::c_int = -5;
-pub const M_PERTURB: ::c_int = -6;
-pub const M_ARENA_TEST: ::c_int = -7;
-pub const M_ARENA_MAX: ::c_int = -8;
-
f! {
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
for slot in cpuset.bits.iter_mut() {
@@ -2143,7 +2129,6 @@ extern {
nobj: ::size_t,
stream: *mut ::FILE
) -> ::size_t;
- pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
}
cfg_if! {
diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs
index 93b710b8df..8e32edf7a7 100644
--- a/src/unix/notbsd/linux/other/mod.rs
+++ b/src/unix/notbsd/linux/other/mod.rs
@@ -824,6 +824,19 @@ pub const NFT_TRACETYPE_RULE: ::c_int = 3;
pub const NFT_NG_INCREMENTAL: ::c_int = 0;
pub const NFT_NG_RANDOM: ::c_int = 1;
+pub const M_MXFAST: ::c_int = 1;
+pub const M_NLBLKS: ::c_int = 2;
+pub const M_GRAIN: ::c_int = 3;
+pub const M_KEEP: ::c_int = 4;
+pub const M_TRIM_THRESHOLD: ::c_int = -1;
+pub const M_TOP_PAD: ::c_int = -2;
+pub const M_MMAP_THRESHOLD: ::c_int = -3;
+pub const M_MMAP_MAX: ::c_int = -4;
+pub const M_CHECK_ACTION: ::c_int = -5;
+pub const M_PERTURB: ::c_int = -6;
+pub const M_ARENA_TEST: ::c_int = -7;
+pub const M_ARENA_MAX: ::c_int = -8;
+
#[doc(hidden)]
pub const AF_MAX: ::c_int = 42;
#[doc(hidden)]
@@ -856,6 +869,7 @@ extern {
pub fn setutxent();
pub fn endutxent();
pub fn getpt() -> ::c_int;
+ pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
}
#[link(name = "util")]