fix freebsd build
authorMike Baker <mbm@openwrt.org>
Fri, 7 Jan 2005 07:02:37 +0000 (07:02 +0000)
committerMike Baker <mbm@openwrt.org>
Fri, 7 Jan 2005 07:02:37 +0000 (07:02 +0000)
SVN-Revision: 192

obsolete-buildroot/sources/openwrt/tools/sstrip.c

index 1842f053c6f1369a78ea0a83b5882fa965252067..e820a44b88bb1229d89f92251103161f1e809315 100644 (file)
 #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