diff --git a/components/lwip/include/lwip/port/lwipopts.h b/components/lwip/include/lwip/port/lwipopts.h index 9df03236..4e3877cc 100644 --- a/components/lwip/include/lwip/port/lwipopts.h +++ b/components/lwip/include/lwip/port/lwipopts.h @@ -37,6 +37,8 @@ #define SOCKETS_MT //#define SOCKETS_TCP_TRACE + +#define LWIP_SUPPORT_CUSTOM_PBUF 1 /* ----------------------------------------------- ---------- Platform specific locking ---------- diff --git a/components/lwip/lwip/src/include/lwip/lwip/pbuf.h b/components/lwip/lwip/src/include/lwip/lwip/pbuf.h index 7ea946dc..e41c1efa 100644 --- a/components/lwip/lwip/src/include/lwip/lwip/pbuf.h +++ b/components/lwip/lwip/src/include/lwip/lwip/pbuf.h @@ -40,9 +40,11 @@ extern "C" { #endif +#ifndef LWIP_SUPPORT_CUSTOM_PBUF /** Currently, the pbuf_custom code is only needed for one specific configuration * of IP_FRAG */ #define LWIP_SUPPORT_CUSTOM_PBUF (IP_FRAG && !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF) +#endif /* @todo: We need a mechanism to prevent wasting memory in every pbuf (TCP vs. UDP, IPv4 vs. IPv6: UDP/IPv4 packets may waste up to 28 bytes) */