refactor(linux): deprecated esp_linux_helper.h

This commit is contained in:
Jakob Hasse 2024-07-30 16:41:28 +02:00
parent f3f8618eee
commit ae15f1c4f9
2 changed files with 6 additions and 12 deletions

View File

@ -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()

View File

@ -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" {