Patch backported from upstream revision 30993 by a3li@gentoo.org. diff -Naur ruby-1.8.7-p334.orig/ext/bigdecimal/bigdecimal.c ruby-1.8.7-p334/ext/bigdecimal/bigdecimal.c --- ruby-1.8.7-p334.orig/ext/bigdecimal/bigdecimal.c 2010-06-08 09:49:18.000000000 +0200 +++ ruby-1.8.7-p334/ext/bigdecimal/bigdecimal.c 2011-05-31 20:53:23.268999218 +0200 @@ -2032,7 +2032,7 @@ VP_EXPORT void * VpMemAlloc(U_LONG mb) { - void *p = xmalloc((unsigned int)mb); + void *p = xmalloc(mb); if(!p) { VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1); }