aboutsummaryrefslogtreecommitdiffstats
path: root/testing/flightgear/musl-fenv.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/flightgear/musl-fenv.patch')
-rw-r--r--testing/flightgear/musl-fenv.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/flightgear/musl-fenv.patch b/testing/flightgear/musl-fenv.patch
new file mode 100644
index 00000000000..8a0922f57d8
--- /dev/null
+++ b/testing/flightgear/musl-fenv.patch
@@ -0,0 +1,19 @@
+Simply disabling the code which enables floating point exceptions
+is probably wrong, but I don't have a replacement for the
+non-posix functions fegetexcept(3) and feenableexcept(3).
+
+--- a/src/Main/bootstrap.cxx 2015-02-18 21:10:05.000000000 +0100
++++ b/src/Main/bootstrap.cxx 2015-11-01 01:25:56.665212195 +0100
+@@ -96,8 +96,12 @@
+ initFPE (bool fpeAbort)
+ {
++#if defined(__GLIBC__)
+ if (fpeAbort) {
+ int except = fegetexcept();
+ feenableexcept(except | FE_DIVBYZERO | FE_INVALID);
+ } else {
+ signal(SIGFPE, handleFPE);
+ }
++#else
++ signal(SIGFPE, handleFPE);
++#endif