From 67b2b3d0ce59fe082b442de30627c3386048eaca Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 12 Aug 2020 11:49:49 +0200 Subject: Fix build on musl and test it in CI --- crates/ra_prof/src/memory_usage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_prof/src') diff --git a/crates/ra_prof/src/memory_usage.rs b/crates/ra_prof/src/memory_usage.rs index c2ecbd33c..83390212a 100644 --- a/crates/ra_prof/src/memory_usage.rs +++ b/crates/ra_prof/src/memory_usage.rs @@ -24,7 +24,7 @@ impl std::ops::Sub for MemoryUsage { impl MemoryUsage { pub fn current() -> MemoryUsage { cfg_if! { - if #[cfg(target_os = "linux")] { + if #[cfg(all(target_os = "linux", target_env = "gnu"))] { // Note: This is incredibly slow. let alloc = unsafe { libc::mallinfo() }.uordblks as isize; MemoryUsage { allocated: Bytes(alloc) } -- cgit v1.2.3