Skip to content

Commit

Permalink
bswap: Fix build on FreeBSD 10.0
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Ed Maste <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
afaerber authored and pm215 committed Apr 3, 2014
1 parent 87d8354 commit de03c31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/qemu/bswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit de03c31

Please sign in to comment.