mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
refactor(linux): Unified libbsd handling
* Users can now use libbsd string.h and sys/cdefs.h functionality (e.g., strlcpy, containerof) on Linux by just including string.h or sys/cdefs.h. In other words, the includes are the same on the Linux target as well as on chips targets (ESP32, etc.). * libbsd linking is done by the linux component (belongs to common components) now instead of handling it separately in each component
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -14,7 +14,7 @@
|
||||
* should go back to #include "sys/queue.h" once the tests are switched to CMake
|
||||
* see IDF-7000
|
||||
*/
|
||||
#if __has_include(<bsd/string.h>)
|
||||
#if __has_include(<bsd/sys/queue.h>)
|
||||
#include <bsd/sys/queue.h>
|
||||
#else
|
||||
#include "sys/queue.h"
|
||||
@@ -33,9 +33,6 @@
|
||||
#include "bootloader_util.h"
|
||||
|
||||
#if CONFIG_IDF_TARGET_LINUX
|
||||
#if __has_include(<bsd/string.h>)
|
||||
#include <bsd/string.h>
|
||||
#endif
|
||||
#include "esp_private/partition_linux.h"
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user