blob: acd2fb14cf835a7e3dc5ac0313620cd05fd16000 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include <endian.h> // for htole64
#include <stdint.h> // for uint64_t
uint64_t htole64(uint64_t host_64bits)
{
#if __BYTE_ORDER == __BIG_ENDIAN
return __builtin_bswap64(host_64bits);
#else
return host_64bits;
#endif
}
|