From 0db66925e14690eb0d4d0239cd226b809ff6588d Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Sat, 4 Sep 2010 09:42:12 +0000 Subject: [PATCH] Add some endianness macro aliases for OpenBSD. --- libfreefare/freefare_internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libfreefare/freefare_internal.h b/libfreefare/freefare_internal.h index 225c29e..82cb996 100644 --- a/libfreefare/freefare_internal.h +++ b/libfreefare/freefare_internal.h @@ -41,6 +41,16 @@ * dealt with). */ +#if !defined(le32toh) && defined(letoh32) +# define le32toh(x) letoh32(x) +# define be32toh(x) betoh32(x) +#endif + +#if !defined(le16toh) && defined(letoh16) +# define le16toh(x) letoh16(x) +# define be16toh(x) betoh16(x) +#endif + #if !defined(le32toh) && defined(bswap_32) # if BYTE_ORDER == LITTLE_ENDIAN # define be32toh(x) bswap_32(x)