From 33811a826f24ff9caabd654005b8c7904d2e8c88 Mon Sep 17 00:00:00 2001 From: cpq Date: Sat, 29 Apr 2023 11:45:28 +0100 Subject: [PATCH] Include TCP/IP API only if enabled --- mongoose.h | 2 +- src/tcpip/tcpip.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.h b/mongoose.h index 365d1b49..71773939 100644 --- a/mongoose.h +++ b/mongoose.h @@ -1598,6 +1598,7 @@ void mg_rpc_verr(struct mg_rpc_req *, int code, const char *fmt, va_list *); void mg_rpc_list(struct mg_rpc_req *r); +#if MG_ENABLE_TCPIP @@ -1659,7 +1660,6 @@ struct mg_tcpip_spi { uint8_t (*txn)(void *, uint8_t); // SPI transaction: write 1 byte, read reply }; -#if MG_ENABLE_TCPIP #if !defined(MG_ENABLE_DRIVER_STM32H) && !defined(MG_ENABLE_DRIVER_TM4C) #define MG_ENABLE_DRIVER_STM32 1 #else diff --git a/src/tcpip/tcpip.h b/src/tcpip/tcpip.h index 3bdcefea..0eb2822b 100644 --- a/src/tcpip/tcpip.h +++ b/src/tcpip/tcpip.h @@ -1,5 +1,6 @@ #pragma once +#if MG_ENABLE_TCPIP #include "arch.h" #include "net.h" #include "queue.h" @@ -61,7 +62,6 @@ struct mg_tcpip_spi { uint8_t (*txn)(void *, uint8_t); // SPI transaction: write 1 byte, read reply }; -#if MG_ENABLE_TCPIP #if !defined(MG_ENABLE_DRIVER_STM32H) && !defined(MG_ENABLE_DRIVER_TM4C) #define MG_ENABLE_DRIVER_STM32 1 #else