From 0f7bcd092f167202ff59c09f20eb258046745ae5 Mon Sep 17 00:00:00 2001
From: Robert Yang <decatf@gmail.com>
Date: Sat, 6 Oct 2018 10:48:24 -0400
Subject: [PATCH] Guard malloc_trim with __GLIBC__

---
 src/exa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/exa.c b/src/exa.c
index ea76dc3..3dd86e6 100644
--- a/src/exa.c
+++ b/src/exa.c
@@ -213,7 +213,9 @@ static void TegraEXATrimHeap(TegraEXAPtr exa)
      */
     if (exa->release_count > TEGRA_MALLOC_TRIM_THRESHOLD) {
         exa->release_count = 0;
+#ifdef __GLIBC__
         malloc_trim(0);
+#endif
     }
 }
 
-- 
2.17.1

