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

[Minios-devel] [UNIKRAFT PATCH] include/essentials: Fix redefinition warnings when using newlib


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Tue, 12 Mar 2019 08:31:57 +0200
  • Cc: Florian.Schmidt@xxxxxxxxx, simon.kuenzer@xxxxxxxxx, yuri.volchkov@xxxxxxxxx, sharan.santhanam@xxxxxxxxx
  • Delivery-date: Tue, 12 Mar 2019 06:32:14 +0000
  • Ironport-phdr: 9a23:xFKRDhwQpR2JAR3XCy+O+j09IxM/srCxBDY+r6Qd2uMeIJqq85mqBkHD//Il1AaPAdyDraodw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94DPbwlSmDaxfK55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHolikJKjA3/mLQhMFrkK5XvAisqwBlzoLIfI2YMud1cKPHfdMdQGpMRthcVytaAoOgbosPCfcKM+BFr4nlulsFsByzChWrBOP01j9Ih3n20bc+0+Q8CQHGwRctEM4VsHjOtNX1KbwdXfqvzKnP1DjOae5d1zTl6IXQbxwsruyAUahzfMfR00UjCR3Jg1eKpYHrJz+Zy+sAv3WB4+djVe+jkXArpg9/rzS128shhZfFi4QIwV7e7yp52pw6JdigRU5+Zt6rDYVfujmBN4tzXsMiW2ZouDsmyrEeuZ60YiwKyJM/yh7BbvyIaYmI4hb5WOmNOjd0nmpleK+kiBqo60igzfXwVsiy0FlUsipIisTAu38Q2xDJ6cWKSuFx8lm/1TuNzQze5PlIIUUumqraL54hzKQwlp0WsUnbAiD2n172jLOXdkUi4OSo7/nnYq37ppKHK4B0kRvyMrwzmsOkG+g4KA8OU3CB+eugzL3j4VH5QLJSg/0zk6nZtpHaJcMApqKgHgBazJgj5Ai7Dzq91NQYnGIHLE5eeB6dgInmJVfOLOr/DfeljFSmiC1ryOzePr39HpXNKWDOnrflfbZ68U5cyRA8zdZF65xJFr4BIPfzWk7su9zEFRI5NRK7zPrjCNpnzYwSQ3yAArKBOqPIrVCI/v4vI/WLZIINozb9K+Iq5+T0gn8/g1MdZrOm3Z0LaHC4BPtmJV+WYX/3j9cHD2gFog4+Q/bxh1GYTzFTem64X7gg6TEjFIKmEYDDS5i2gLyA2Se7GZtWanpFClCRD3jocYSFVOkWaC+JJM9ujCALVby7RIA6zx2hqhL6waJ9LuXI4i0YqY7j1N9t6uzTiBEy7z10A96D02GKS2F7gmMIRzwx3KBhukF9zEmM3rR8g/NCDtNf/e1GUhppfaLbmul7DdH1QUfNc8mETH6iQ866GnchQ9R3xMUBMGhnHND3pRfYwyusS5sIj6HDUJcz6b7d2T71Ot5g433dkrE8hR88RZ0cZiWdmqdj+l2LVMbymEKDmvPyeA==
  • Ironport-sdr: PkA+L4IKf9tjIMWASOlmuCNuQgH7d9PDhb3gkaNsGSvUZwQW4I7+zjukPGzh1rR/5fvWugxtvX kQYcr9uMjxRA==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

For some macrodefinitions, newlib headers do not care if they were
previously defined and this results in redefinitions compiler warnings.
In some way, it makes sense to give priority to newlib's definitions if
one decides to use it as a libc implementation. Therefore we include the
newlib headers in essentials.h to give priority to their definitions
instead of ours.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 include/uk/essentials.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/uk/essentials.h b/include/uk/essentials.h
index 47e04f7c..cdcb5625 100644
--- a/include/uk/essentials.h
+++ b/include/uk/essentials.h
@@ -38,6 +38,14 @@
 #ifndef __UK_ESSENTIALS_H__
 #define __UK_ESSENTIALS_H__
 
+#include <uk/config.h>
+
+#if CONFIG_LIBNEWLIBC
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <inttypes.h>
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
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®.