Bug #74744 [NEW]: gd.h: stdarg.h include missing for va_list use in gdErrorMethod

From: Date: Sun, 11 Jun 2017 11:37:50 +0000
Subject: Bug #74744 [NEW]: gd.h: stdarg.h include missing for va_list use in gdErrorMethod
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209477@lists.php.net to get a copy of this message
From: rainer dot jung at kippdata dot de Operating system: Solaris PHP version: 7.2.0alpha1 Package: GD related Bug Type: Bug Bug description:gd.h: stdarg.h include missing for va_list use in gdErrorMethod Description: ------------ The following commit introduced the use of "va_list" to the bundled libgd: https://github.com/php/php-src/commit/432e16cb58c76762d6b512f256f7e07d5c3857f4 va_list either needs an include for stdarg.h or varargs.h. Upstream libgd include stdarg.h unconditionally. If we want to stick with what php.h does, the following patch would be appropriate: --- ext/gd/libgd/gd.h 2017-06-06 15:25:00.000000000 +0200 +++ ext/gd/libgd/gd.h 2017-06-11 13:31:24.826517000 +0200 @@ -46,5 +46,18 @@ #include <stdio.h> #include "gd_io.h" +/* va_list needed in gdErrorMethod */ +#ifdef PHP_WIN32 +# include <stdarg.h> +#else +# if HAVE_STDARG_H +# include <stdarg.h> +# else +# if HAVE_SYS_VARARGS_H +# include <sys/varargs.h> +# endif +# endif +#endif + /* The maximum number of palette entries in palette-based images. The problem exists in 7.2 and master, not in 7.1. -- Edit bug report at https://bugs.php.net/bug.php?id=74744&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74744&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74744&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74744&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74744&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74744&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74744&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74744&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74744&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74744&r=support Expected behavior: https://bugs.php.net/fix.php?id=74744&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74744&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74744&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74744&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74744&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74744&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74744&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74744&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74744&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74744&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74744&r=mysqlcfg

« previous php.bugs (#209477) next »