Skip to contentSkip to conversation

Include string.h before console.h

PATCH In review Wei Liu 3 participants 6 messages Oct 4, 2017 – Oct 5, 2017 Library code

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH v2 1/1 Include string.h before console.h

Starting from Xen commit af8d93564, it is required to include string.h before console.h.

---
Cc: Ian Jackson <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Samuel Thibault <[email protected]>

After applying this patch to mini-os I will update Xen's Config.mk to fix the build failure in xen.git.

There are quite a few places in the not yet functioning arm port. I opt to skip them so that we can unblock staging asap.

---
 lib/sys.c   | 1 +
 lwip-arch.c | 1 +
 main.c      | 1 +
 3 files changed, 3 insertions(+)
lib/sys.c +1 -0
index b173bc8..23dc2a5 100644
@@ -20,6 +20,7 @@
 
 #ifdef HAVE_LIBC
 #include <os.h>
+#include <string.h>
 #include <console.h>
 #include <sched.h>
 #include <events.h>
lwip-arch.c +1 -0
index 154617b..21e941e 100644
@@ -8,6 +8,7 @@
 
 #include <os.h>
 #include <time.h>
+#include <string.h>
 #include <console.h>
 #include <xmalloc.h>
 #include <lwip/sys.h>
main.c +1 -0
index 263364c..4e42f53 100644
@@ -8,6 +8,7 @@
 #include <os.h>
 #include <kernel.h>
 #include <sched.h>
+#include <string.h>
 #include <console.h>
 #include <netfront.h>
 #include <pcifront.h>
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v2 1/1
#1 lore raw
Quoted 4 lines · Wei Liu, on mer. 04 oct. 2017 14:51:26 +0100, wrote:

Starting from Xen commit af8d93564, it is required to include string.h before console.h.

Quoted 55 lines

---
Cc: Ian Jackson <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Samuel Thibault <[email protected]>

After applying this patch to mini-os I will update Xen's Config.mk to fix the build failure in xen.git.

There are quite a few places in the not yet functioning arm port. I opt to skip them so that we can unblock staging asap.

---
 lib/sys.c   | 1 +
 lwip-arch.c | 1 +
 main.c      | 1 +
 3 files changed, 3 insertions(+)
lib/sys.c +1 -0
index b173bc8..23dc2a5 100644
@@ -20,6 +20,7 @@
 
 #ifdef HAVE_LIBC
 #include <os.h>
+#include <string.h>
 #include <console.h>
 #include <sched.h>
 #include <events.h>
lwip-arch.c +1 -0
index 154617b..21e941e 100644
@@ -8,6 +8,7 @@
 
 #include <os.h>
 #include <time.h>
+#include <string.h>
 #include <console.h>
 #include <xmalloc.h>
 #include <lwip/sys.h>
main.c +1 -0
index 263364c..4e42f53 100644
@@ -8,6 +8,7 @@
 #include <os.h>
 #include <kernel.h>
 #include <sched.h>
+#include <string.h>
 #include <console.h>
 #include <netfront.h>
 #include <pcifront.h>
Signature · 1 line
2.11.0
Signature · 8 lines
Samuel
<b> j'en ai parlé à xavier, il n'est pas interdit qu'il le change un jour
 -+- #sos - a le bras long vers le chameau -+-

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#2 lore raw
In reply to Wei Liu
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 04.10.17 at 15:51, <[email protected]> wrote:

Starting from Xen commit af8d93564, it is required to include string.h before console.h.

But that's broken then - there shouldn't be such an effect for anyone updating their public headers. IOW I think this needs to be dealt with by further adjusting console.h, e.g. by making the additions depend on a manifest symbol to be defined.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#3 lore raw
Quoted 9 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 04.10.17 at 15:51, <[email protected]> wrote:

Starting from Xen commit af8d93564, it is required to include string.h before console.h.

But that's broken then - there shouldn't be such an effect for anyone updating their public headers. IOW I think this needs to be dealt with by further adjusting console.h, e.g. by making the additions depend on a manifest symbol to be defined.

This should work.

This isn't just console.h alone. Any header that uses DEFINE_XEN_FLEX_RING will potentially need a manifest symbol. We get away so far because the two other headers 9pfs.h and pvcalls.h are relatively new.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#4 lore raw

CC Stefano and Julien

Quoted 11 lines · Wei Liu
Quoted 9 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 04.10.17 at 15:51, <[email protected]> wrote:

Starting from Xen commit af8d93564, it is required to include string.h before console.h.

But that's broken then - there shouldn't be such an effect for anyone updating their public headers. IOW I think this needs to be dealt with by further adjusting console.h, e.g. by making the additions depend on a manifest symbol to be defined.

Quoted 6 lines

This should work.

This isn't just console.h alone. Any header that uses DEFINE_XEN_FLEX_RING will potentially need a manifest symbol. We get away so far because the two other headers 9pfs.h and pvcalls.h are relatively new.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#5 lore raw
In reply to Wei Liu
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 05.10.17 at 11:28, <[email protected]> wrote:
Quoted 9 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 04.10.17 at 15:51, <[email protected]> wrote:

Starting from Xen commit af8d93564, it is required to include string.h before console.h.

But that's broken then - there shouldn't be such an effect for anyone updating their public headers. IOW I think this needs to be dealt with by further adjusting console.h, e.g. by making the additions depend on a manifest symbol to be defined.

Quoted 6 lines

This should work.

This isn't just console.h alone. Any header that uses DEFINE_XEN_FLEX_RING will potentially need a manifest symbol. We get away so far because the two other headers 9pfs.h and pvcalls.h are relatively new.

Right, and for new headers it is fine to establish prereq inclusion requirements from the very beginning.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel