Skip to content

Commit

Permalink
Darwin uses architecture/byte_order.h, not bitfn.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
Forrest L Norvell committed May 30, 2013
1 parent 2d01a56 commit 001dfc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bitfn.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ static inline uint64_t swap64(uint64_t a)
#endif

/* big endian to cpu */
#ifdef __APPLE__
#include <architecture/byte_order.h>
#else
#include <endian.h>
#endif

#if LITTLE_ENDIAN == BYTE_ORDER
#define be32_to_cpu(a) swap32(a)
#define cpu_to_be32(a) swap32(a)
Expand Down

0 comments on commit 001dfc5

Please sign in to comment.