Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r--source/creator/creator.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 2ad3881a4a0..c3bf8968650 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -26,6 +26,12 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
+#if defined(__linux__) && defined(__GNUC__)
+#define _GNU_SOURCE
+#include <fenv.h>
+#endif
+
#include <stdlib.h>
#include <string.h>
@@ -35,10 +41,6 @@
#include <unistd.h>
#endif
-#ifdef __linux__
-#include <fenv.h>
-#endif
-
/* This little block needed for linking to Blender... */
#include "MEM_guardedalloc.h"
@@ -350,7 +352,7 @@ static int set_fpe(int argc, char **argv, void *data)
* set breakpoints on fpe_handler */
signal(SIGFPE, fpe_handler);
-#ifdef __linux__
+#if defined(__linux__) && defined(__GNUC__)
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
#endif
#endif