mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
add some fixes for compiling on mac os x
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@574 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <elf.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/**
|
||||
* This seems to work on FreeBSD 5.3, should
|
||||
@@ -71,10 +72,18 @@
|
||||
#define bswap_64 __bswap64
|
||||
#define bswap_32 __bswap32
|
||||
#define bswap_16 __bswap16
|
||||
#elif defined(__APPLE__)
|
||||
#include <machine/endian.h>
|
||||
#include <machine/byte_order.h>
|
||||
#define __BYTE_ORDER BYTE_ORDER
|
||||
#define __BIG_ENDIAN BIG_ENDIAN
|
||||
#define bswap_16(x) NXSwapShort(x)
|
||||
#define bswap_32(x) NXSwapInt(x)
|
||||
#define bswap_64(x) NXSwapLongLong(x)
|
||||
#else
|
||||
#include <endian.h>
|
||||
#include <byteswap.h>
|
||||
#endif /* defined(__FreeBSD__) */
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef TRUE
|
||||
|
||||
Reference in New Issue
Block a user