diff --git a/modules/contrib/backtrace.c b/modules/contrib/backtrace.c
index 8c4eeb2..064e88e 100644
--- a/modules/contrib/backtrace.c
+++ b/modules/contrib/backtrace.c
@@ -1,6 +1,6 @@
 #include "atheme-compat.h"
 
-#if defined( __linux__) || defined(__Linux__)
+#if (defined( __linux__) || defined(__Linux__)) && defined(__GLIBC__)
 #include <execinfo.h>
 
 DECLARE_MODULE_V1
