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

[Minios-devel] [UNIKRAFT/LIBNEWLIB PATCH 1/2] patches: compile guard MIN/MAX



Put guards around definitions of MIN/MAX macros to prevent double
definition warnings.

Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx>
---
 patches/0009-guard-min-max-definitions.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 patches/0009-guard-min-max-definitions.patch

diff --git a/patches/0009-guard-min-max-definitions.patch 
b/patches/0009-guard-min-max-definitions.patch
new file mode 100644
index 0000000..6c86e71
--- /dev/null
+++ b/patches/0009-guard-min-max-definitions.patch
@@ -0,0 +1,15 @@
+--- a/newlib/libc/include/sys/param.h  2019-08-30 16:15:49.591775421 +0200
++++ b/newlib/libc/include/sys/param.h  2019-08-30 16:15:38.659888767 +0200
+@@ -25,8 +25,12 @@
+ 
+ #define MAXPATHLEN PATH_MAX
+ 
++#ifndef MAX
+ #define MAX(a,b) ((a) > (b) ? (a) : (b))
++#endif
++#ifndef MIN
+ #define MIN(a,b) ((a) < (b) ? (a) : (b))
++#endif
+ 
+ #ifndef howmany
+ #define    howmany(x, y)   (((x)+((y)-1))/(y))
-- 
2.11.0


_______________________________________________
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®.