]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commitdiff
bswap: Fix build on FreeBSD 10.0
authorAndreas Färber <andreas.faerber@web.de>
Wed, 2 Apr 2014 14:06:38 +0000 (16:06 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 3 Apr 2014 12:44:25 +0000 (13:44 +0100)
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>
include/qemu/bswap.h

index 0cb7c05554a3df31fdf0e074bd491a90716eb91e..0f9c6cf15d4cf7ecd7dbd78afb4b23ad8fa77540 100644 (file)
@@ -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>