Merge branch 'bugfix/coap_gcc8_format_error' into 'master'

coap: fix format error with GCC 8, define WITH_POSIX in the port header

See merge request idf/esp-idf!4639
This commit is contained in:
Ivan Grokhotkov 2019-03-29 23:50:52 +08:00
commit 7cbd863d04
4 changed files with 9 additions and 8 deletions

View File

@ -24,8 +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)

View File

@ -1 +0,0 @@
CPPFLAGS += -DWITH_POSIX

View File

@ -10,3 +10,5 @@ COMPONENT_SRCDIRS := libcoap/src libcoap port
COMPONENT_SUBMODULES += libcoap
# Silence format truncation warning, until it is fixed upstream
libcoap/src/coap_debug.o: CFLAGS += -Wno-format-truncation

View File

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