qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC for-2.0] bswap: Fix build on FreeBSD 10.0


From: Andreas Färber
Subject: [Qemu-devel] [RFC for-2.0] bswap: Fix build on FreeBSD 10.0
Date: Wed, 2 Apr 2014 16:06:38 +0200

FreeBSD 10.0-RELEASE has bswap16() etc. macros defined in sys/endian.h,
which leads to a conflict with our static inline definitions.

Force using the system version of the macros.

Signed-off-by: Andreas Färber <address@hidden>
---
 On 9.0-RELEASE I did not have this issue, so unsure if some version check
 is needed or some more generic configure check?

 include/qemu/bswap.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 0cb7c05..0f9c6cf 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -11,6 +11,8 @@
 # include <sys/endian.h>
 # include <sys/types.h>
 # include <machine/bswap.h>
+#elif defined(__FreeBSD__)
+# include <sys/endian.h>
 #elif defined(CONFIG_BYTESWAP_H)
 # include <byteswap.h>
 
-- 
1.8.4.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]