From 2962af6fe6688eebfc30b4cd4e4d0da37e0d4097 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 23 Oct 2022 14:00:00 +0800 Subject: [PATCH] Fix fatal error: array: No such file or directory enable test_stl2 only when CONFIG_LIBCXX is enabled since uClibc++/minic++ doesn't have array header file Signed-off-by: Xiang Xiao --- testing/cxxtest/cxxtest_main.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/cxxtest/cxxtest_main.cxx b/testing/cxxtest/cxxtest_main.cxx index 4be644178..65b485d81 100644 --- a/testing/cxxtest/cxxtest_main.cxx +++ b/testing/cxxtest/cxxtest_main.cxx @@ -36,7 +36,7 @@ #ifdef CONFIG_CXX_EXCEPTION #include #endif -#if __cplusplus >= 201703L +#if defined(CONFIG_LIBCXX) && __cplusplus >= 201703L #include #include #endif @@ -61,7 +61,7 @@ public: } }; -#if __cplusplus >= 201703L +#if defined(CONFIG_LIBCXX) && __cplusplus >= 201703L class File { public: @@ -193,7 +193,7 @@ static void test_stl() // Name: test_stl2 //***************************************************************************/ -#if __cplusplus >= 201703L +#if defined(CONFIG_LIBCXX) && __cplusplus >= 201703L auto test_stl2() -> void { std::cout << "Test C++17 features ==========================" << std::endl; @@ -274,7 +274,7 @@ extern "C" int main(int argc, char *argv[]) test_ofstream(); test_iostream(); test_stl(); -#if __cplusplus >= 201703L +#if defined(CONFIG_LIBCXX) && __cplusplus >= 201703L test_stl2(); #endif #ifdef CONFIG_CXX_RTTI