fix_fenv_header.patch (1073B)
1 --- gcc-12.2.0.orig/libstdc++-v3/include/c_global/cfenv 2023-04-12 13:43:21.180583885 +0200 2 +++ gcc-12.2.0/libstdc++-v3/include/c_global/cfenv 2023-04-12 13:44:49.377613899 +0200 3 @@ -37,9 +37,14 @@ 4 5 #include <bits/c++config.h> 6 7 -#if _GLIBCXX_HAVE_FENV_H 8 -# include <fenv.h> 9 -#endif 10 +//#if _GLIBCXX_HAVE_FENV_H 11 +//# include <fenv.h> 12 +//#endif 13 +// Need to ensure this finds the C library's <fenv.h> not a libstdc++ 14 +// wrapper that might already be installed later in the include search path. 15 +#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 16 +# include_next <fenv.h> 17 +#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS 18 19 #ifdef _GLIBCXX_USE_C99_FENV_TR1 20 21 --- gcc-12.2.0.orig/libstdc++-v3/include/c_compatibility/fenv.h 2023-04-12 13:43:32.290629656 +0200 22 +++ gcc-12.2.0/libstdc++-v3/include/c_compatibility/fenv.h 2023-04-12 13:45:36.341140694 +0200 23 @@ -25,6 +25,9 @@ 24 /** @file fenv.h 25 * This is a Standard C++ Library header. 26 */ 27 +#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS 28 +# include_next <fenv.h> 29 +#else 30 31 #ifndef _GLIBCXX_FENV_H 32 #define _GLIBCXX_FENV_H 1