summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-06-17 22:17:06 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-06-27 16:36:15 +0100
commitdbbc2e583207f0bc6ceb275cecce456b1082be6e (patch)
treefd1861539b7317cc355607da21c17e5ac013d60f
parent0e6eef54449f20c420a8724e86c052fc73b621bf (diff)
downloadlibguestfs-dbbc2e583207f0bc6ceb275cecce456b1082be6e.tar.gz
libguestfs-dbbc2e583207f0bc6ceb275cecce456b1082be6e.tar.xz
libguestfs-dbbc2e583207f0bc6ceb275cecce456b1082be6e.zip
EPEL 5: Define le64toh if not defined.
-rw-r--r--src/inspect_fs_windows.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/inspect_fs_windows.c b/src/inspect_fs_windows.c
index 1a341927..2d6fee29 100644
--- a/src/inspect_fs_windows.c
+++ b/src/inspect_fs_windows.c
@@ -46,6 +46,16 @@
#if defined(HAVE_HIVEX)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifndef le64toh
+#define le64toh(x) (x)
+#endif
+#else /* __BYTE_ORDER == __BIG_ENDIAN */
+#ifndef le64toh
+#define le64toh(x) bswap_64 (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