Fix build on 4.x

PR:		ports/95906
Submitted by:	Jeffrey H. Johnson
This commit is contained in:
Volker Stolz 2006-04-17 11:06:55 +00:00
parent 3a1b96c6d2
commit cc5f4bac25
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=159784

View File

@ -0,0 +1,22 @@
$FreeBSD$
--- wavpack.c.orig
+++ wavpack.c
@@ -1604,6 +1604,7 @@
MultiByteToWideChar (CP_ACP, 0, string, -1, temp, max_chars + 1);
WideCharToUTF8 (temp, (uchar *) string, len);
#else
+ iconv_t converter;
char *temp = malloc (len);
char *outp = temp;
char *inp = string;
@@ -1614,7 +1615,7 @@
memset(temp, 0, len);
old_locale = setlocale (LC_CTYPE, "");
- iconv_t converter = iconv_open ("UTF-8", "");
+ converter = iconv_open ("UTF-8", "");
err = iconv (converter, &inp, &insize, &outp, &outsize);
iconv_close (converter);
setlocale (LC_CTYPE, old_locale);