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

Signed-off-by: Roger Pau Monné <roger....@citrix.com>
---
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(+)

diff --git a/tools/xenstore/include/xenstore_state.h 
b/tools/xenstore/include/xenstore_state.h
index d2a9307400..1bd443f61a 100644
--- a/tools/xenstore/include/xenstore_state.h
+++ b/tools/xenstore/include/xenstore_state.h
@@ -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
-- 
2.29.2


Reply via email to