--- src/posix/OSPosix.cpp.orig  2017-08-19 20:00:23.645790781 +0200
+++ src/posix/OSPosix.cpp       2017-08-19 20:00:44.153855997 +0200
@@ -48,7 +48,7 @@

 void EnableFPE()
 {
-#if defined(_GNU_SOURCE) && !defined(__APPLE__)
+#if defined(_GNU_SOURCE) && !defined(__APPLE__) && defined(__GLIBC__)
	// clear any outstanding exceptions before enabling, otherwise they'll
	// trip immediately
        feclearexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
@@ -58,7 +58,7 @@

 void DisableFPE()
 {
-#if defined(_GNU_SOURCE) && !defined(__APPLE__)
+#if defined(_GNU_SOURCE) && !defined(__APPLE__) && defined(__GLIBC__)
	fedisableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
 #endif
 }
