From b5ff783083547d2fb13f7a5a2cc0ecad41c21e8c Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Wed, 3 Mar 2004 19:59:43 +0000 Subject: arrays of variable size are not understood by all compilers (and I think they are not ANSI as well) CVS patchset: 6209 CVS date: 2004/03/03 19:59:43 --- src/xine-utils/xineutils.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index b5d51309b..f93854891 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.79 2004/01/07 22:20:59 jstembridge Exp $ + * $Id: xineutils.h,v 1.80 2004/03/03 19:59:43 mroi Exp $ * */ #ifndef XINEUTILS_H @@ -719,10 +719,11 @@ static inline char *_private_strsep(char **stringp, const char *delim) { #else static inline void _private_setenv(const char *name, const char *val, int _xx) { int len = strlen(name) + strlen(val) + 2; - char env[len]; + char *env = (char *)malloc(len); sprintf(env, "%s%c%s", name, '=', val); putenv(env); + free(env); } #define xine_setenv _private_setenv #endif -- cgit v1.2.3