aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/bswap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qemu/bswap.h')
-rw-r--r--include/qemu/bswap.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 95071ba9e8..fcedf0d249 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -419,11 +419,9 @@ static inline void stfq_be_p(void *ptr, float64 v)
static inline unsigned long leul_to_cpu(unsigned long v)
{
- /* In order to break an include loop between here and
- qemu-common.h, don't rely on HOST_LONG_BITS. */
-#if ULONG_MAX == UINT32_MAX
+#if HOST_LONG_BITS == 32
return le_bswap(v, 32);
-#elif ULONG_MAX == UINT64_MAX
+#elif HOST_LONG_BITS == 64
return le_bswap(v, 64);
#else
# error Unknown sizeof long