Skip to content

Commit

Permalink
Merge branch 'refactor/deprecate_esp_linux_helper_h' into 'master'
Browse files Browse the repository at this point in the history
refactor(linux): deprecated esp_linux_helper.h

Closes IDF-9391

See merge request espressif/esp-idf!32448
  • Loading branch information
0xjakob committed Jul 31, 2024
2 parents 40a910b + ae15f1c commit 1ced233
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 5 additions & 7 deletions components/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
6 changes: 1 addition & 5 deletions components/linux/include/esp_linux_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 1ced233

Please sign in to comment.