coap: define WITH_POSIX in coap_config.h instead of globally
This commit is contained in:
parent
8016448fb1
commit
624725d6e0
3 changed files with 5 additions and 8 deletions
|
@ -24,10 +24,5 @@ set(COMPONENT_REQUIRES lwip)
|
|||
|
||||
register_component()
|
||||
|
||||
# Needed for coap headers in public builds, also.
|
||||
#
|
||||
# TODO: find a way to move this to a port header
|
||||
target_compile_definitions(${COMPONENT_TARGET} PUBLIC WITH_POSIX)
|
||||
|
||||
# Silence format truncation warning, until it is fixed upstream
|
||||
set_source_files_properties(libcoap/src/coap_debug.c PROPERTIES COMPILE_FLAGS -Wno-format-truncation)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
CPPFLAGS += -DWITH_POSIX
|
|
@ -18,10 +18,13 @@
|
|||
#ifndef _CONFIG_H_
|
||||
#define _CONFIG_H_
|
||||
|
||||
#ifdef WITH_POSIX
|
||||
#include "coap_config_posix.h"
|
||||
/* Always enabled in ESP-IDF */
|
||||
#ifndef WITH_POSIX
|
||||
#define WITH_POSIX
|
||||
#endif
|
||||
|
||||
#include "coap_config_posix.h"
|
||||
|
||||
#define HAVE_STDIO_H
|
||||
#define HAVE_ASSERT_H
|
||||
|
||||
|
|
Loading…
Reference in a new issue