[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT/LWIP PATCH 5/5] patches: Declare mem_* functions only for lwip internal use



Hey,

together with this patch, you could add the flag __liblwip__ (or written in capital letters) as library-local:

   LIBLWIP_CFLAGS-y   += -D__liblwip__

What do you think?

Thanks,

Simon

On 02.08.19 14:57, Costin Lupu wrote:
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@xxxxxxxxx>
---
  ...functions-only-for-lwip-internal-use.patch | 31 +++++++++++++++++++
  1 file changed, 31 insertions(+)
  create mode 100644 
patches/0003-Declare-mem_-functions-only-for-lwip-internal-use.patch

diff --git 
a/patches/0003-Declare-mem_-functions-only-for-lwip-internal-use.patch 
b/patches/0003-Declare-mem_-functions-only-for-lwip-internal-use.patch
new file mode 100644
index 0000000..1f594e4
--- /dev/null
+++ b/patches/0003-Declare-mem_-functions-only-for-lwip-internal-use.patch
@@ -0,0 +1,31 @@
+From f9306780b544b45cdb091695b486ba56a892e70d Mon Sep 17 00:00:00 2001
+From: Costin Lupu <costin.lup@xxxxxxxxx>
+Date: Fri, 2 Aug 2019 13:21:19 +0200
+Subject: [UNIKRAFT PATCH] Declare mem_* functions only for lwip internal use
+
+Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
+---
+ src/include/lwip/mem.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/include/lwip/mem.h b/src/include/lwip/mem.h
+index 424de91..dbb5230 100644
+--- a/src/include/lwip/mem.h
++++ b/src/include/lwip/mem.h
+@@ -69,11 +69,13 @@ typedef u16_t mem_size_t;
+ #endif /* MEM_SIZE > 64000 */
+ #endif
+
++#ifdef __liblwip__
+ void  mem_init(void);
+ void *mem_trim(void *mem, mem_size_t size);
+ void *mem_malloc(mem_size_t size);
+ void *mem_calloc(mem_size_t count, mem_size_t size);
+ void  mem_free(void *mem);
++#endif
+
+ #ifdef __cplusplus
+ }
+--
+2.20.1
+


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.