projects/aports·blob master · refs

25 lines · 884 B

1musl does not provice feenableexcept and fedisableexcept. Those calls have
2only been used on linux so far. This patch extends the #ifdef logic to only use
3them on Linux if additionally glibc is used.
4diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
5index 0545d7496d..475edd0f71 100644
6--- a/src/OSD/OSD_signal.cxx
7+++ b/src/OSD/OSD_signal.cxx
8@@ -744,7 +744,7 @@ LONG _osd_debug(void)
9 // POSIX threads
10 #include <pthread.h>
11
12- #ifdef __linux__
13+ #ifdef __linux__ && defined(__GLIBC__)
14 #include <cfenv>
15 // #include <fenv.h>
16 #endif
17@@ -866,7 +866,7 @@ static void Handler(const int theSignal)
18 case SIGFPE:
19 sigaddset(&set, SIGFPE);
20 sigprocmask(SIG_UNBLOCK, &set, NULL);
21- #ifdef __linux__
22+ #ifdef __linux__ && defined(__GLIBC__)
23 OSD::SetFloatingSignal(Standard_True);
24 #endif
25 #if (!defined(__sun)) && (!defined(SOLARIS))