aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-01-25 15:24:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-01-25 15:38:54 +0200
commit23c07078a9f2790b96a6ee6a6183911aaec71533 (patch)
treeb6c7a63dda27c29ecee68755b5bd7c674289ff2b
parent2755fc8ad0a92ddae7a22fdca9406d37bd1caa03 (diff)
Rename unalign to LZ4_unalign in lz4.c not to clash with unalign in xxhash.c
Upstream issue 1053.
-rw-r--r--libbutl/lz4.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libbutl/lz4.c b/libbutl/lz4.c
index eac0541..3f0e430 100644
--- a/libbutl/lz4.c
+++ b/libbutl/lz4.c
@@ -343,14 +343,14 @@ static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; }
/* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */
/* currently only defined for gcc and icc */
-typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign;
+typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) LZ4_unalign;
-static U16 LZ4_read16(const void* ptr) { return ((const unalign*)ptr)->u16; }
-static U32 LZ4_read32(const void* ptr) { return ((const unalign*)ptr)->u32; }
-static reg_t LZ4_read_ARCH(const void* ptr) { return ((const unalign*)ptr)->uArch; }
+static U16 LZ4_read16(const void* ptr) { return ((const LZ4_unalign*)ptr)->u16; }
+static U32 LZ4_read32(const void* ptr) { return ((const LZ4_unalign*)ptr)->u32; }
+static reg_t LZ4_read_ARCH(const void* ptr) { return ((const LZ4_unalign*)ptr)->uArch; }
-static void LZ4_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; }
-static void LZ4_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; }
+static void LZ4_write16(void* memPtr, U16 value) { ((LZ4_unalign*)memPtr)->u16 = value; }
+static void LZ4_write32(void* memPtr, U32 value) { ((LZ4_unalign*)memPtr)->u32 = value; }
#else /* safe and portable access using memcpy() */