Skip to content

Commit d0f1e97

Browse files
vadorovskyjackpot51
authored andcommitted
fix: Call malloc_trim only on glibc systems
`malloc_trim` is provided only by glibc and doesn't exist in other libc implementations, including musl. Fixes #62
1 parent 9896668 commit d0f1e97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub fn backends(locale: &str, refresh: bool) -> Backends {
108108
});
109109

110110
//TODO: Workaround for xml-rs memory leak when loading appstream data
111-
#[cfg(target_os = "linux")]
111+
#[cfg(all(target_os = "linux", target_env = "gnu"))]
112112
{
113113
let start = Instant::now();
114114
unsafe {

0 commit comments

Comments
 (0)