diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-01-07 07:02:37 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-01-07 07:02:37 +0000 |
commit | 3542143e422ec3bcf768c8920357dae2e9761d92 (patch) | |
tree | 01173333a8b3d9b1c7d2d356ca14330d795a19a9 /obsolete-buildroot/sources/openwrt/tools/sstrip.c | |
parent | e6632627d3d97d868372f2e222f8af92ba53120a (diff) |
fix freebsd build
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@192 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/sources/openwrt/tools/sstrip.c')
-rw-r--r-- | obsolete-buildroot/sources/openwrt/tools/sstrip.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/obsolete-buildroot/sources/openwrt/tools/sstrip.c b/obsolete-buildroot/sources/openwrt/tools/sstrip.c index 1842f053c..e820a44b8 100644 --- a/obsolete-buildroot/sources/openwrt/tools/sstrip.c +++ b/obsolete-buildroot/sources/openwrt/tools/sstrip.c @@ -59,8 +59,23 @@ #include <unistd.h> #include <fcntl.h> #include <elf.h> +#ifdef __FreeBSD__ +/** + * This seems to work on FreeBSD 5.3, should + * work on all newer versions as well. I have + * no idea if it will work on versions < 5.3 + * + * Joe Estock (guru) <jestock at nutextonline.com> + */ +#include <sys/endian.h> +#define bswap_64 __bswap64 +#define bswap_32 __bswap32 +#define bswap_16 __bswap16 +#else #include <endian.h> #include <byteswap.h> +#endif /* defined(__FreeBSD__) */ + #ifndef TRUE #define TRUE 1 |