Bug #74744 [Ana->Csd]: gd.h: stdarg.h include missing for va_list use in gdErrorMethod

From: Date: Sun, 11 Jun 2017 15:41:29 +0000
Subject: Bug #74744 [Ana->Csd]: gd.h: stdarg.h include missing for va_list use in gdErrorMethod
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209481@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74744&edit=1 ID: 74744 Updated by: cmb@php.net Reported by: rainer dot jung at kippdata dot de Summary: gd.h: stdarg.h include missing for va_list use in gdErrorMethod -Status: Analyzed +Status: Closed Type: Bug Package: GD related Operating System: Solaris PHP Version: 7.2.0alpha1 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=68a0639c8f5afae87773e70cefcf706c6013e599 Log: Fix #74744: gd.h: stdarg.h include missing for va_list use in gdErrorMethod Previous Comments: ------------------------------------------------------------------------ [2017-06-11 14:58:33] cmb@php.net Thanks, Rainer! Guess it makes sense to stick with PHP's conditional inclusion for now, so I'm going to apply your patch. ------------------------------------------------------------------------ [2017-06-11 11:37:44] rainer dot jung at kippdata dot de 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 this bug report at https://bugs.php.net/bug.php?id=74744&edit=1

« previous php.bugs (#209481) next »