Remove unnecessary htonll() macro definition.
Macros and functions starting with two underscores are usually
internal and shouldn't be used by applications when a version
without "__" is available.
Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
#include <netinet/in.h>
#include <inttypes.h>
#include <assert.h>
+#include <endian.h>
#define CS_SIZE 16
#define CHUNKS 128
#define SEEK_DATA 3
#define SEEK_HOLE 4
#endif
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define htonll(x) __bswap_64 (x)
-#else
-#define htonll(x) (x)
-#endif
#endif
/* TODO: add hardlink recognition */
void
sum_add_u64(sum_t *dst, uint64_t val)
{
- uint64_t v = htonll(val);
+ uint64_t v = htobe64(val);
sum_add(dst, &v, sizeof(v));
}