Skip to contentSkip to conversation

xenstore: fix build on {Net/Free}BSD

PATCH New Roger Pau Monne 2 participants 2 messages Feb 1, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xenstore: fix build on {Net/Free}BSD

The endian.h header is in sys/ on NetBSD and FreeBSD.

---
Only tested on FreeBSD, but from my reading the header is at the same place on NetBSD.

---
 tools/xenstore/include/xenstore_state.h | 4 ++++
 1 file changed, 4 insertions(+)
tools/xenstore/include/xenstore_state.h +4 -0
index d2a9307400..1bd443f61a 100644
@@ -21,7 +21,11 @@
 #ifndef XENSTORE_STATE_H
 #define XENSTORE_STATE_H
 
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+#include <sys/endian.h>
+#else
 #include <endian.h>
+#endif
 #include <sys/types.h>
 
 #ifndef htobe32
Signature · 1 line
2.29.2