diff mbox series

[for-4.15] xenstore: fix build on {Net/Free}BSD

Message ID 20210201155317.57748-1-roger.pau@citrix.com (mailing list archive)
State New
Headers show
Series [for-4.15] xenstore: fix build on {Net/Free}BSD | expand

Commit Message

Roger Pau Monné Feb. 1, 2021, 3:53 p.m. UTC
The endian.h header is in sys/ on NetBSD and FreeBSD.

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

Comments

Ian Jackson Feb. 1, 2021, 4:32 p.m. UTC | #1
Roger Pau Monne writes ("[PATCH for-4.15] xenstore: fix build on {Net/Free}BSD"):
> The endian.h header is in sys/ on NetBSD and FreeBSD.

That's a bit irritating.  Ah well.

Acked-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>

Ian.
diff mbox series

Patch

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