42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
|
musl does not provice feenableexcept and fedisableexcept. Those calls have
|
||
|
only been used on linux so far. This patch extends the #ifdef logic to only use
|
||
|
them on Linux if additionally glibc is used.
|
||
|
--- occt-V7_4_0-org/src/OSD/OSD_signal.cxx
|
||
|
+++ occt-V7_4_0/src/OSD/OSD_signal.cxx
|
||
|
@@ -678,7 +678,7 @@
|
||
|
// POSIX threads
|
||
|
#include <pthread.h>
|
||
|
|
||
|
-#ifdef __linux__
|
||
|
+#ifdef __linux__ && defined(__GLIBC__)
|
||
|
#include <cfenv>
|
||
|
//#include <fenv.h>
|
||
|
#endif
|
||
|
@@ -793,7 +793,7 @@
|
||
|
case SIGFPE:
|
||
|
sigaddset(&set, SIGFPE);
|
||
|
sigprocmask(SIG_UNBLOCK, &set, NULL) ;
|
||
|
-#ifdef __linux__
|
||
|
+#ifdef __linux__ && defined(__GLIBC__)
|
||
|
OSD::SetFloatingSignal (Standard_True);
|
||
|
#endif
|
||
|
#if (!defined (__sun)) && (!defined(SOLARIS))
|
||
|
@@ -914,7 +914,7 @@
|
||
|
//=======================================================================
|
||
|
void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
|
||
|
{
|
||
|
-#if defined (__linux__)
|
||
|
+#if defined (__linux__) && defined(__GLIBC__)
|
||
|
feclearexcept (FE_ALL_EXCEPT);
|
||
|
if (theFloatingSignal)
|
||
|
{
|
||
|
@@ -947,7 +947,7 @@
|
||
|
//=======================================================================
|
||
|
Standard_Boolean OSD::ToCatchFloatingSignals()
|
||
|
{
|
||
|
-#if defined (__linux__)
|
||
|
+#if defined (__linux__) && defined(__GLIBC__)
|
||
|
return (fegetexcept() & _OSD_FPX) != 0;
|
||
|
#else
|
||
|
return Standard_False;
|