Old glibc doesn't provide these macros, so we have to define them. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> --- base/endian_utils.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) Index: thin-provisioning-tools/base/endian_utils.h =================================================================== --- thin-provisioning-tools.orig/base/endian_utils.h 2014-11-08 00:26:05.000000000 +0100 +++ thin-provisioning-tools/base/endian_utils.h 2014-11-08 00:26:20.000000000 +0100 @@ -25,6 +25,26 @@ //---------------------------------------------------------------- +/* An old glic doesn't provide these macros */ +#if !defined(htole16) || !defined(le16toh) || !defined(htole32) || !defined(le32toh) || !defined(htole64) || !defined(le64toh) +#include <byteswap.h> +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define htole16(x) (x) +#define le16toh(x) (x) +#define htole32(x) (x) +#define le32toh(x) (x) +#define htole64(x) (x) +#define le64toh(x) (x) +#else +#define htole16(x) __bswap_16(x) +#define le16toh(x) __bswap_16(x) +#define htole32(x) __bswap_32(x) +#define le32toh(x) __bswap_32(x) +#define htole64(x) __bswap_64(x) +#define le64toh(x) __bswap_64(x) +#endif +#endif + namespace base { // These are just little wrapper types to make the compiler _______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/