include_next.patch From: Christian Prochaska --- include/bits/std_abs.h | 2 +- include/c_global/cmath | 7 ++++++- include/c_global/cstdlib | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/bits/std_abs.h b/include/bits/std_abs.h index 6e4551d..65d50b5 100644 --- a/include/bits/std_abs.h +++ b/include/bits/std_abs.h @@ -35,7 +35,7 @@ #include #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS -#include_next +#include #ifdef __CORRECT_ISO_CPP_MATH_H_PROTO # include_next #endif diff --git a/include/c_global/cmath b/include/c_global/cmath index 4489e17..83f4937 100644 --- a/include/c_global/cmath +++ b/include/c_global/cmath @@ -42,7 +42,12 @@ #include #include #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS -#include_next +// On Genode, the libc include paths appear before the stdcxx include paths +// and the original '#include_next' failed. Adding the libc include paths +// to INC_DIR again did not help, because the duplication was detected +// and ignored. So, math.h is included with '#include' again, like in +// previous GCC versions. +#include #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS #include diff --git a/include/c_global/cstdlib b/include/c_global/cstdlib index 1033501..e39ed31 100644 --- a/include/c_global/cstdlib +++ b/include/c_global/cstdlib @@ -72,7 +72,12 @@ namespace std // Need to ensure this finds the C library's not a libstdc++ // wrapper that might already be installed later in the include search path. #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS -#include_next +// On Genode, the libc include paths appear before the stdcxx include paths +// and the original '#include_next' failed. Adding the libc include paths +// to INC_DIR again did not help, because the duplication was detected +// and ignored. So, stdlib.h is included with '#include' again, like in +// previous GCC versions. +#include #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS #include