mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
b2af4d9689
linux/lwip: Wrap some IO posix functions * to workaourd the FreeRTOS EINTR issue (when building without lwip) * to correctly choose the sub-system based on fd (when building with lwip) -- passing control to either linux/system or to lwip This commit also addapts tapio-if to provide DHCP client by default and configurable settings for static IP
21 lines
438 B
C
21 lines
438 B
C
/*
|
|
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if CONFIG_IDF_TARGET_LINUX && !defined(__containerof)
|
|
#define __containerof(ptr, type, member) ({ \
|
|
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
|
(type *)( (char *)__mptr - offsetof(type,member) );})
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|