diff --git a/meson.build b/meson.build index 9b65c152dc7..4e4d9e70bbc 100644 --- a/meson.build +++ b/meson.build @@ -1438,6 +1438,11 @@ elif with_tools.contains('intel') error('Intel tools require the program_invocation_name variable') endif +if cc.has_header_symbol('math.h', 'issignaling', + args : '-D_GNU_SOURCE') + pre_args += '-DHAVE_ISSIGNALING' +endif + # MinGW provides a __builtin_posix_memalign function, but not a posix_memalign. # This means that this check will succeed, but then compilation will later # fail. MSVC doesn't have this function at all, so only check for it on diff --git a/src/util/tests/half_float_test.cpp b/src/util/tests/half_float_test.cpp index f3f5aa6ffb4..051e0d0376a 100644 --- a/src/util/tests/half_float_test.cpp +++ b/src/util/tests/half_float_test.cpp @@ -38,8 +38,7 @@ #define HALF_NEG_INF 0xfc00 #define HALF_NAN 0x7e00 -#if defined(ANDROID) || defined (__MINGW32__) -/* Android and mingw were missing this function, roll our own as a best effort. */ +#ifndef HAVE_ISSIGNALING static bool issignaling(float x) { uint32_t ui = fui(x);