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

Re: [Minios-devel] [UNIKRAFT/NEWLIB PATCH 16/16] patches: Allow including custom malloc.h headers



Hello Costin,

this patch looks good.

Thank you.


Reviewed-by: Charalampos Mainas <charalampos.mainas@xxxxxxxxx>




From: Costin Lupu <costin.lupu@xxxxxxxxx>
Sent: Thursday, August 22, 2019 12:10 PM
To: minios-devel@xxxxxxxxxxxxx
Cc: Felipe Huici; Charalampos Mainas
Subject: [UNIKRAFT/NEWLIB PATCH 16/16] patches: Allow including custom malloc.h headers
 
We found this while porting Go runtime. The libgo library had its own malloc.h
header which it tried to include, but because of global include paths it
included the malloc.h of newlib. We workaround this by defining
_INCLUDE_MALLOC_H_ guard before including newlib's malloc.h and including our
own malloc.h next.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 ...tch-in-order-to-include-custom-mallo.patch | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 patches/0008-Apply-hackish-patch-in-order-to-include-custom-mallo.patch

diff --git a/patches/0008-Apply-hackish-patch-in-order-to-include-custom-mallo.patch b/patches/0008-Apply-hackish-patch-in-order-to-include-custom-mallo.patch
new file mode 100644
index 0000000..28d5fcc
--- /dev/null
+++ b/patches/0008-Apply-hackish-patch-in-order-to-include-custom-mallo.patch
@@ -0,0 +1,26 @@
+From 5671ec3aeb7f237e0c5d25f13a7f2004756b6eea Mon Sep 17 00:00:00 2001
+From: Costin Lupu <costin.lup@xxxxxxxxx>
+Date: Fri, 16 Aug 2019 23:09:15 +0200
+Subject: [PATCH] Apply hackish patch in order to include custom malloc.h
+ header first
+
+Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
+---
+ newlib/libc/include/malloc.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/newlib/libc/include/malloc.h b/newlib/libc/include/malloc.h
+index 41b5efd..682dde4 100644
+--- a/newlib/libc/include/malloc.h
++++ b/newlib/libc/include/malloc.h
+@@ -166,4 +166,7 @@ extern void cfree _PARAMS ((_PTR));
+ }
+ #endif
+
++#else
++#include_next <malloc.h>
++
+ #endif /* _INCLUDE_MALLOC_H_ */
+--
+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®.