flightgear: fix musl

This commit is contained in:
Jürgen Buchmüller 2017-03-17 09:56:33 +01:00
parent 4c69009407
commit 0c721fa012
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,22 @@
--- src/Main/bootstrap.cxx 2017-03-17 09:52:07.474706542 +0100
+++ src/Main/bootstrap.cxx 2017-03-17 09:53:40.361793507 +0100
@@ -141,7 +141,7 @@
}
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && defined(__GLIBC__)
#include <execinfo.h>
#include <cxxabi.h>
void segfault_handler(int signo) {
@@ -244,8 +244,10 @@
signal(SIGPIPE, SIG_IGN);
# ifndef NDEBUG
+# ifdef __GLIBC__
signal(SIGSEGV, segfault_handler);
# endif
+# endif
#endif
_bootstrap_OSInit = 0;

View File

@ -0,0 +1,11 @@
--- src/FDM/JSBSim/JSBSim.cpp 2017-03-01 21:06:31.000000000 +0100
+++ src/FDM/JSBSim/JSBSim.cpp 2017-03-17 09:49:13.115544107 +0100
@@ -287,7 +287,7 @@
_clearfp();
_controlfp(_controlfp(0, 0) & ~(_EM_INVALID | _EM_ZERODIVIDE | _EM_OVERFLOW),
_MCW_EM);
-#elif defined(__GNUC__) && !defined(sgi) && !defined(__APPLE__)
+#elif defined(__GNUC__) && !defined(sgi) && !defined(__APPLE__) && defined(__GLIBC__)
feenableexcept(FE_DIVBYZERO | FE_INVALID);
#endif