From ed78d2593450a470509883f01e0b994f49236e1d Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Tue, 4 Oct 2022 12:48:54 -0300 Subject: [PATCH] webserver: Help users to easily identify missing configurations Co-authored-by: Petro Karashchenko --- examples/webserver/webserver_main.c | 4 ++++ include/netutils/httpd.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/examples/webserver/webserver_main.c b/examples/webserver/webserver_main.c index 62f283fcb..55a14534b 100644 --- a/examples/webserver/webserver_main.c +++ b/examples/webserver/webserver_main.c @@ -83,6 +83,10 @@ * Pre-processor Definitions ****************************************************************************/ +#ifndef CONFIG_NETUTILS_WEBSERVER +# error "CONFIG_NETUTILS_WEBSERVER is required to get WebServer working" +#endif + /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/include/netutils/httpd.h b/include/netutils/httpd.h index 2a3f261a4..da8f57fbd 100644 --- a/include/netutils/httpd.h +++ b/include/netutils/httpd.h @@ -72,6 +72,10 @@ * MSS value. Here we arbitrarily select the minimum MSS for that case. */ +#ifndef MIN_TCP_MSS +# error "You need to enable TCP/IP (i.e. CONFIG_NET_TCP) to use HTTPD" +#endif + #define HTTPD_IOBUFFER_SIZE (3*MIN_TCP_MSS) /* This is the maximum size of a file path */