void-packages/srcpkgs/occt/patches/musl-fenv.patch
Piraty 1b4cc7c8d4 New package: occt-7.2.0p1
Closes #13404.

Signed-off-by: Enno Boland <gottox@voidlinux.eu>
2018-04-19 08:44:54 +02:00

37 lines
1.2 KiB
Diff

--- src/OSD/OSD_signal.cxx.orig
+++ src/OSD/OSD_signal.cxx
@@ -687,7 +687,7 @@
// cout << "OSD::Handler: signal " << (int) theSignal << " occured inside a try block " << endl ;
if ( ADR_ACT_SIGIO_HANDLER != NULL )
(*ADR_ACT_SIGIO_HANDLER)() ;
-#ifdef __linux__
+#if defined(__linux__) && defined(__GLIBC__)
if (fFltExceptions)
feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
//feenableexcept (FE_INVALID | FE_DIVBYZERO);
@@ -805,7 +805,7 @@
(void)theSignal; // silence GCC warnings
(void)theContext;
-#ifdef __linux__
+#if defined(__linux__) && defined(__GLIBC__)
if (fFltExceptions)
feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
//feenableexcept (FE_INVALID | FE_DIVBYZERO);
@@ -891,14 +891,14 @@
cerr << "ieee_handler does not work !!! KO " << endl;
#endif
}
-#elif defined (__linux__)
+#elif defined(__linux__) && defined(__GLIBC__)
feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
fFltExceptions = Standard_True;
#endif
}
else
{
-#if defined (__linux__)
+#if defined(__linux__) && defined(__GLIBC__)
fedisableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
fFltExceptions = Standard_False;
#endif