summaryrefslogtreecommitdiff
path: root/src/zmalloc.c
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2011-11-16 17:21:16 +0000
committerChris Lamb <lamby@debian.org>2011-11-16 17:21:16 +0000
commit5ae979bf5798f5eaab56636034623d25bc70a941 (patch)
tree2c8bc6f4a6e0b0ea53caeb6ec3406d43a6535307 /src/zmalloc.c
parent42c6a5da3d4738597217494198f4d3ba9be1113d (diff)
downloadredis-5ae979bf5798f5eaab56636034623d25bc70a941.tar.gz
Fix crash on SPARC due to improper alignment of allocated memory
I believe that you should be able to drop 'defined(__sun)' completely from this clause, as Solaris on x86 hardware probably does not have strict alignment requirements, but I don't have a way to test that. Thanks to Jurij Smakov <jurij@wooyd.org>. Signed-off-by: Chris Lamb <lamby@debian.org>
Diffstat (limited to 'src/zmalloc.c')
-rw-r--r--src/zmalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zmalloc.c b/src/zmalloc.c
index 5408c2faf..56b9140c9 100644
--- a/src/zmalloc.c
+++ b/src/zmalloc.c
@@ -38,7 +38,7 @@
#ifdef HAVE_MALLOC_SIZE
#define PREFIX_SIZE (0)
#else
-#if defined(__sun)
+#if defined(__sun) || defined(__sparc) || defined(__sparc__)
#define PREFIX_SIZE (sizeof(long long))
#else
#define PREFIX_SIZE (sizeof(size_t))