From 1f77bfff9608f97996bffdb28dabec4e787631f6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 7 Mar 2013 17:32:29 +0000 Subject: build: BSD compile fixes following patch allows to build images for Qemu ARM on OpenBSD 5.2 amd64 and FreeBSD 9.1 amd64. Mostly small pieces of code changes to get things right on the specific platform. Updated the README to describe better, which tools on the host are required. Added some kind of prepare scripts to install needed tools on BSD via packages. Signed-off-by: Waldemar Brodkorb SVN-Revision: 35900 --- tools/include/endian.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/include/endian.h') diff --git a/tools/include/endian.h b/tools/include/endian.h index 0f17b41da7..bba70abd83 100644 --- a/tools/include/endian.h +++ b/tools/include/endian.h @@ -15,6 +15,11 @@ #define bswap_16(x) bswap16(x) #define bswap_32(x) bswap32(x) #define bswap_64(x) bswap64(x) +#elif defined(__OpenBSD__) +#include +#define bswap_16(x) __swap16(x) +#define bswap_32(x) __swap32(x) +#define bswap_64(x) __swap64(x) #else #include #define bswap_16(x) swap16(x) -- cgit v1.2.3