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

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


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Fri, 16 Aug 2019 10:09:41 +0300
  • Cc: felipe.huici@xxxxxxxxx, simon.kuenzer@xxxxxxxxx
  • Delivery-date: Fri, 16 Aug 2019 07:10:02 +0000
  • Ironport-phdr: 9a23:dmgbrBatHWuXNU7g0XBU/73/LSx+4OfEezUN459isYplN5qZr8S7bnLW6fgltlLVR4KTs6sC17OM9fm7AydZuMrJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MQu6oR/MusQYn4duJbs9xgbGr3BVZ+lY2GRkKE6JkR3h/Mmw5plj8ypRu/Il6cFNVLjxcro7Q7JFEjkoKng568L3uxbNSwuP/WYcXX4NkhVUGQjF7Qr1UYn3vyDnq+dywiiaPcnxTbApRTSv6rpgRRH0hCsbMTMy7WfagdFygq1GuhKsvxxxzZDJbo+bN/RweaHSfd0BSGZdQspcTTBND5mgY4cTCecKIOZWr5P6p1sLtRazGw6sBPjzyj9JgH/9wKs00/k5EQHbwQctGM4BsHPPrNXpNacSV/q5zK3VzTXbcvNbwivy6JPSfhA5vPGDRqh8cdDWyUQ2EQ7Ok1aeqZT9Mj+I2ekBrnKX4ulgWO61lWIrtQN8riKhy8s0l4XEiZ8ZxkrH+Ch52oo5O9O1RUBhbdK5H5ZcqSeXPJZsTMw4WWFnoiM6x6UDuZ68YScF1owqxwXaa/yba4iI5Q/jVPqJLTd4mn1lfLW/ig6s8Uil0OL8V8203ExWoSpeiNXMrm0N2AfJ5sidTftx5kah2TCR2ADP8uxIPE85mbfBJ5MiwrM8jIQfvVrBEyPslkj6lKqWeV8l+uis5eTneLLmppqEOoBojQH+Kbgums25AegiNggOQnCb+fmn2bL/5k31Wq1KjuAtnaXDqpDaItwXprSlDA9NzoYj9xG/Ai+j0NQZm3kHLVVFeAmeg4f0JV7OPu73DfOkjlSokTdr3OzGPqb7DpTCMHfDlq3tfbFn605T0AAz18xQ54pICrEdJ/L+QkHxu8LcDh84Kwy73fzrCNVg1oMfRW2PA7SUMKXMvlCU4uIgOfKDaJULtzbgM/Il/eLhjWclmV8BeqmkxYAXaHG9HvRhJUWVe3nsgsofHmcMvwsxUvbqhUaEUTFNe3myW7gz6SohBI24EIeQDryq1bmA2ia8Bdhaa35LDniIEGz0bMOUVvFKbzidceF7lTlRfr+6V44nnTWzrBKyn7FgNfbV/GscqIr+/NNuofXOn1co8monXIymz2iRQjQszSszTDgs0fUnrA==
  • Ironport-sdr: gfH+IRyDNVgt+a49Fzfm7G6FltCdcaC4JTxnXiWocUFLKTF9gXySkLNOqdRN0CkmUc6RjuLcjg GCpa+Na+y/2A==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

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>
---
 Makefile.uk                                   |  2 ++
 ...functions-only-for-lwip-internal-use.patch | 31 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 
patches/0003-Declare-mem_-functions-only-for-lwip-internal-use.patch

diff --git a/Makefile.uk b/Makefile.uk
index 675d52e..5249df1 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -65,6 +65,8 @@ CXXINCLUDES-$(CONFIG_LIBLWIP) += -I$(LIBLWIP_BASE)/include 
-I$(LIBLWIP_EXTRACTED
 
################################################################################
 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
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..45f8920
--- /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 __IN_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
+
-- 
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®.