mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-03 09:30:14 +00:00
20 lines
618 B
Diff
20 lines
618 B
Diff
https://github.com/termux/termux-packages/issues/15849
|
|
Partial backport of https://github.com/redis/redis/commit/f3f6f7c0d66f136146a912e06c8fbe31ecfbc977
|
|
|
|
Please always test on arm (32-bit) arch if you modify or delete this patch.
|
|
|
|
--- a/src/zmalloc.c
|
|
+++ b/src/zmalloc.c
|
|
@@ -60,8 +60,9 @@
|
|
#ifdef HAVE_MALLOC_SIZE
|
|
#define PREFIX_SIZE (0)
|
|
#else
|
|
-#if defined(__sun) || defined(__sparc) || defined(__sparc__)
|
|
-#define PREFIX_SIZE (sizeof(long long))
|
|
+/* Use at least 8 bytes alignment on all systems. */
|
|
+#if SIZE_MAX < 0xffffffffffffffffull
|
|
+#define PREFIX_SIZE 8
|
|
#else
|
|
#define PREFIX_SIZE (sizeof(size_t))
|
|
#endif
|