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