define le32toh and htole32, this allow to compile against libc that doesn't provide these functions (like Debian Lenny)
This commit is contained in:
parent
8a62a843ac
commit
8b2de449c7
1 changed files with 12 additions and 0 deletions
|
@ -20,6 +20,18 @@
|
|||
#ifndef __FREEFARE_INTERNAL_H__
|
||||
#define __FREEFARE_INTERNAL_H__
|
||||
|
||||
#if !defined(le32toh) || !defined(htole32)
|
||||
#include <byteswap.h>
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define le32toh(x) (x)
|
||||
#define htole32(x) bswap_32(x)
|
||||
#else
|
||||
#define le32toh(x) bswap_32(x)
|
||||
#define htole32(x) (x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
struct mad_sector_0x00;
|
||||
struct mad_sector_0x10;
|
||||
|
||||
|
|
Loading…
Reference in a new issue