Openssl has its own mem_* functions declarations, which differ from the lwip
ones. Therefore we enable the lwip declarations only for lwip code.
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
################################################################################
LIBLWIP_CFLAGS-y += -Wno-type-limits -Wunused-parameter
LIBLWIP_CFLAGS-$(CONFIG_LWIP_DEBUG) += -DUK_DEBUG
-
+LIBLWIP_CFLAGS-y += -D__IN_LIBLWIP__
+LIBLWIP_CXXFLAGS-y += -D__IN_LIBLWIP__
+
################################################################################
# Core
################################################################################
--- /dev/null
+--- a/src/include/lwip/mem.h
++++ b/src/include/lwip/mem.h
+@@ -69,11 +69,13 @@
+ #endif /* MEM_SIZE > 64000 */\r
+ #endif\r
+ \r
++#ifdef __IN_LIBLWIP__\r
+ void mem_init(void);\r
+ void *mem_trim(void *mem, mem_size_t size);\r
+ void *mem_malloc(mem_size_t size);\r
+ void *mem_calloc(mem_size_t count, mem_size_t size);\r
+ void mem_free(void *mem);\r
++#endif\r
+ \r
+ #ifdef __cplusplus\r
+ }\r