From 6526b5b23277a16e5394d506dfab88e29bba8fb4 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 10 Mar 2021 14:20:18 +0200 Subject: [PATCH] samples: net: civetweb: Avoid using mbedtls Civetweb does not work properly with mbedtls if Posix APIs are enabled. For example time function prototypes are not found by the mbedtls module if we enable mbedtls in the sample. Disable TCP ISN RFC6528 support because of this for civetweb samples, as setting that option will pull in mbedtls and we get a compilation warning because time() is not declared by any header file that mbedtls is including. Signed-off-by: Jukka Rissanen --- samples/net/civetweb/http_server/prj.conf | 4 ++++ samples/net/civetweb/websocket_server/prj.conf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/samples/net/civetweb/http_server/prj.conf b/samples/net/civetweb/http_server/prj.conf index 0ae5434230b..3b80108a67b 100644 --- a/samples/net/civetweb/http_server/prj.conf +++ b/samples/net/civetweb/http_server/prj.conf @@ -30,3 +30,7 @@ CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2" # logging CONFIG_NET_LOG=y + +# Do not include mbedtls via this option as civetweb does not +# work properly with mbedtls. +CONFIG_NET_TCP_ISN_RFC6528=n diff --git a/samples/net/civetweb/websocket_server/prj.conf b/samples/net/civetweb/websocket_server/prj.conf index 6b2ec8bd257..b582bdd9219 100644 --- a/samples/net/civetweb/websocket_server/prj.conf +++ b/samples/net/civetweb/websocket_server/prj.conf @@ -34,3 +34,7 @@ CONFIG_IDLE_STACK_SIZE=1024 CONFIG_LOG=y # CONFIG_NET_LOG=y # CONFIG_LOG_STRDUP_MAX_STRING=256 + +# Do not include mbedtls via this option as civetweb does not +# work properly with mbedtls. +CONFIG_NET_TCP_ISN_RFC6528=n