From 24e2426b9e80b4bc791e1ca50b7e2222767d3299 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Wed, 31 Jul 2024 15:27:03 +0700 Subject: [PATCH] fix(newlib): fix include sys/dirent.h breaking change --- components/newlib/CMakeLists.txt | 3 --- .../{clang_include => platform_include}/sys/dirent.h | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) rename components/newlib/{clang_include => platform_include}/sys/dirent.h (92%) diff --git a/components/newlib/CMakeLists.txt b/components/newlib/CMakeLists.txt index 21cb9eb2ac..0d05270881 100644 --- a/components/newlib/CMakeLists.txt +++ b/components/newlib/CMakeLists.txt @@ -5,9 +5,6 @@ if(${target} STREQUAL "linux") endif() set(include_dirs "platform_include") -if(CMAKE_C_COMPILER_ID MATCHES "Clang") # TODO LLVM-330 - list(APPEND include_dirs "clang_include") -endif() if(BOOTLOADER_BUILD) # Bootloader builds need the platform_include directory (for assert.h), but nothing else diff --git a/components/newlib/clang_include/sys/dirent.h b/components/newlib/platform_include/sys/dirent.h similarity index 92% rename from components/newlib/clang_include/sys/dirent.h rename to components/newlib/platform_include/sys/dirent.h index 444dad2ddf..2643ddc954 100644 --- a/components/newlib/clang_include/sys/dirent.h +++ b/components/newlib/platform_include/sys/dirent.h @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ - +#ifdef __clang__ // TODO LLVM-330 #pragma once #include @@ -63,3 +63,8 @@ int alphasort(const struct dirent **d1, const struct dirent **d2); #ifdef __cplusplus } #endif + +#else // __clang__ TODO: IDF-10675 +#include_next +#include +#endif // __clang__