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>
This commit is contained in:
Chris Lamb 2011-11-16 17:21:16 +00:00
parent 860acb386c
commit a4ca54db1a

View File

@ -38,7 +38,7 @@
#ifdef HAVE_MALLOC_SIZE #ifdef HAVE_MALLOC_SIZE
#define PREFIX_SIZE (0) #define PREFIX_SIZE (0)
#else #else
#if defined(__sun) #if defined(__sun) || defined(__sparc) || defined(__sparc__)
#define PREFIX_SIZE (sizeof(long long)) #define PREFIX_SIZE (sizeof(long long))
#else #else
#define PREFIX_SIZE (sizeof(size_t)) #define PREFIX_SIZE (sizeof(size_t))