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

Roger Pau Monne posted 1 patch 3 years, 2 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20210201155317.57748-1-roger.pau@citrix.com
tools/xenstore/include/xenstore_state.h | 4 ++++
1 file changed, 4 insertions(+)
[PATCH for-4.15] xenstore: fix build on {Net/Free}BSD
Posted by Roger Pau Monne 3 years, 2 months ago
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(+)

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


[PATCH for-4.15] xenstore: fix build on {Net/Free}BSD
Posted by Ian Jackson 3 years, 2 months ago
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.