From d9d908f6e55afd550dd25c5708c8ae396dd26a55 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 2 Jun 2019 21:09:16 -0600 Subject: Fix the build on Linux/mips with recent libc libc just undefined MADV_SOFT_OFFLINE on mips. https://github.com/rust-lang/libc/pull/1365 Fixes #1074 --- src/sys/mman.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/sys') diff --git a/src/sys/mman.rs b/src/sys/mman.rs index dd92ffc0..4e250501 100644 --- a/src/sys/mman.rs +++ b/src/sys/mman.rs @@ -139,7 +139,15 @@ libc_enum!{ #[cfg(any(target_os = "android", target_os = "linux"))] MADV_UNMERGEABLE, /// Preserve the memory of each page but offline the original page. - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", + all(target_os = "linux", any( + target_arch = "aarch64", + target_arch = "arm", + target_arch = "ppc", + target_arch = "s390x", + target_arch = "x86", + target_arch = "x86_64", + target_arch = "sparc64"))))] MADV_SOFT_OFFLINE, /// Enable Transparent Huge Pages (THP) for pages in the given range. #[cfg(any(target_os = "android", target_os = "linux"))] -- cgit v1.2.3