summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Färber <andreas.faerber@web.de>2014-04-02 16:06:38 +0200
committerPeter Maydell <peter.maydell@linaro.org>2014-04-03 13:44:25 +0100
commitde03c3164accc21311c39327601fcdd95da301f3 (patch)
treeb3bc3a392dcb0181b5d12a54fa08905231efa833
parent87d8354de3560eb705bcee83142d775f703177a6 (diff)
downloadqemu-de03c3164accc21311c39327601fcdd95da301f3.tar.gz
bswap: Fix build on FreeBSD 10.0
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 <andreas.faerber@web.de> Tested-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--include/qemu/bswap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 0cb7c05554..0f9c6cf15d 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>