diff --git a/glib-core/bd.cpp b/glib-core/bd.cpp index c363a93fd..b73abd156 100644 --- a/glib-core/bd.cpp +++ b/glib-core/bd.cpp @@ -10,10 +10,15 @@ int std::_matherr(struct math_exception* e){ return 1; } #elif defined(GLib_GLIBC) || defined(GLib_BSD) + +#include +#if !__GLIBC_PREREQ(2, 27) /* facility removed as part of glibc 2.27 */ int _matherr(struct __exception* e){ e->retval=0; return 1; } +#endif + #elif defined(GLib_SOLARIS) int _matherr(struct __math_exception* e){ e->retval=0;