From 5ae979bf5798f5eaab56636034623d25bc70a941 Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Wed, 16 Nov 2011 17:21:16 +0000 Subject: [PATCH] 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 . Signed-off-by: Chris Lamb --- src/zmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zmalloc.c b/src/zmalloc.c index 5408c2fa..56b9140c 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)) -- 2.47.2