From: Mark Cave-Ayland Date: Tue, 23 Sep 2008 21:32:19 +0000 (+0000) Subject: Use __va_copy() to pass a copy of the variadic structure to lw_vasprintf() to solve... X-Git-Tag: 1.4.0b1~710 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3a4081c51c098ebe4141026dfcabad1994d49c2;p=postgis Use __va_copy() to pass a copy of the variadic structure to lw_vasprintf() to solve ABI difference between 32bit/64bit architectures. git-svn-id: http://svn.osgeo.org/postgis/trunk@2998 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/vsprintf.c b/liblwgeom/vsprintf.c index a183b5fb2..abad18c2c 100644 --- a/liblwgeom/vsprintf.c +++ b/liblwgeom/vsprintf.c @@ -144,7 +144,12 @@ lw_vasprintf (result, format, args) const char *format; va_list args; { - return int_vasprintf (result, format, args); + va_list temp; + + /* Use va_copy for compatibility with both 32 and 64 bit args */ + __va_copy(temp, args); + + return int_vasprintf (result, format, &temp); } int