]> granicus.if.org Git - esp-idf/commitdiff
coap: define WITH_POSIX in coap_config.h instead of globally
authorIvan Grokhotkov <ivan@espressif.com>
Thu, 28 Mar 2019 08:29:13 +0000 (16:29 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Thu, 28 Mar 2019 08:29:13 +0000 (16:29 +0800)
components/coap/CMakeLists.txt
components/coap/Makefile.projbuild [deleted file]
components/coap/port/include/coap_config.h

index 45788001c8eeac17af73f009d3616e08f1ef6b79..1ec70b4990fcdac7179412b95b81d8d35c146d4e 100644 (file)
@@ -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)
diff --git a/components/coap/Makefile.projbuild b/components/coap/Makefile.projbuild
deleted file mode 100644 (file)
index e900b0f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-CPPFLAGS += -DWITH_POSIX
index db314f2de901ac5c2d68e964ef6f1e9b9a3001fe..1efa37aa7f79ab0fbc803c60aa797265e93ff7c3 100644 (file)
 #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