Skip to content

Commit

Permalink
EPEL 5: Define le64toh, le32toh if not defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwmjones committed Oct 17, 2013
1 parent c0eceb1 commit 8bf06ca
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/inspect-fs-windows.c
Expand Up @@ -44,6 +44,22 @@
#include "guestfs-internal-actions.h"
#include "guestfs_protocol.h"

#if __BYTE_ORDER == __LITTLE_ENDIAN
#ifndef le64toh
#define le64toh(x) (x)
#endif
#ifndef le32toh
#define le32toh(x) (x)
#endif
#else /* __BYTE_ORDER == __BIG_ENDIAN */
#ifndef le64toh
#define le64toh(x) bswap_64 (x)
#endif
#ifndef le32toh
#define le32toh(x) bswap_32 (x)
#endif
#endif

/* Compile all the regular expressions once when the shared library is
* loaded. PCRE is thread safe so we're supposedly OK here if
* multiple threads call into the libguestfs API functions below
Expand Down

0 comments on commit 8bf06ca

Please sign in to comment.