|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v4 5/6] tools: Use new byteswap helper
Include new header to use new byteswap helper
No functional change.
Signed-off-by: Lin Liu <lin.liu@xxxxxxxxxx>
---
Cc: Wei Liu <wl@xxxxxxx>
Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
---
tools/libs/guest/xg_dom_decompress_unsafe_xz.c | 5 +++++
tools/libs/guest/xg_dom_decompress_unsafe_zstd.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
index fc48198741..493427d517 100644
--- a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
+++ b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
@@ -34,6 +34,11 @@ static inline u32 le32_to_cpup(const u32 *p)
return cpu_to_le32(*p);
}
+static inline u32 le32_to_cpu(u32 val)
+{
+ return le32_to_cpup((const u32 *)&val);
+}
+
#define __force
#define always_inline
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
index 01eafaaaa6..b06f2e767f 100644
--- a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
+++ b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
@@ -31,7 +31,8 @@ typedef uint64_t __be64;
#define __BYTEORDER_HAS_U64__
#define __TYPES_H__ /* xen/types.h guard */
-#include "../../xen/include/xen/byteorder/little_endian.h"
+#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+#include "../../xen/include/xen/byteorder.h"
#define __ASM_UNALIGNED_H__ /* asm/unaligned.h guard */
#include "../../xen/include/xen/unaligned.h"
#include "../../xen/include/xen/xxhash.h"
--
2.27.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |