diff --git a/components/linux/CMakeLists.txt b/components/linux/CMakeLists.txt index 7d044d860e8f..e446de0e9db2 100644 --- a/components/linux/CMakeLists.txt +++ b/components/linux/CMakeLists.txt @@ -15,11 +15,9 @@ idf_component_register(INCLUDE_DIRS ${includes} REQUIRED_IDF_TARGETS linux SRCS ${srcs}) -if(${IDF_TARGET} STREQUAL "linux") - find_library(LIB_BSD bsd) - if(LIB_BSD) - target_link_libraries(${COMPONENT_LIB} PRIVATE ${LIB_BSD}) - elseif(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") - message(WARNING "Missing LIBBSD library. Install libbsd-dev package and/or check linker directories.") - endif() +find_library(LIB_BSD bsd) +if(LIB_BSD) + target_link_libraries(${COMPONENT_LIB} PRIVATE ${LIB_BSD}) +elseif(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + message(WARNING "Missing LIBBSD library. Install libbsd-dev package and/or check linker directories.") endif() diff --git a/components/linux/include/esp_linux_helper.h b/components/linux/include/esp_linux_helper.h index 3ffb4417e0b5..d69da455c681 100644 --- a/components/linux/include/esp_linux_helper.h +++ b/components/linux/include/esp_linux_helper.h @@ -5,11 +5,7 @@ */ #pragma once -/* - * NOTE: This file is deprecated and will be removed in the future. - * Use include sys/cdefs.h instead, it will also include - * the corresponding libbsd header. TODO: IDF-9391 - */ +#warning "This file is deprecated, as __containerof is available via libbsd. To use __containerof, include string.h." #ifdef __cplusplus extern "C" {