Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 2010 14:20:02 GMT
From:      Anonymous <swell.k@gmail.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/150074: [patch] games/hex-a-hop: update to 1.1.0
Message-ID:  <201008291420.o7TEK2wS095437@freefall.freebsd.org>

Next in thread | Raw E-Mail | Index | Archive | Help
The following reply was made to PR ports/150074; it has been noted by GNATS.

From: Anonymous <swell.k@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150074: [patch] games/hex-a-hop: update to 1.1.0
Date: Sun, 29 Aug 2010 18:09:32 +0400

 Looks like I've stepped on a landmine: const qualifier in iconv.h.
 Below is a patch from the maintainer that fixes compilation with GNU iconv.
 
 --- c.diff begins here ---
 Index: games/hex-a-hop/files/patch-src-text.cpp
 ===================================================================
 RCS file: games/hex-a-hop/files/patch-src-text.cpp
 diff -N games/hex-a-hop/files/patch-src-text.cpp
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ games/hex-a-hop/files/patch-src-text.cpp	29 Aug 2010 14:00:10 -0000
 @@ -0,0 +1,11 @@
 +--- src/text.cpp~
 ++++ src/text.cpp
 +@@ -439,7 +439,7 @@ void ConvertToUTF8(const std::string &te
 + 	errno = 0;
 + 	static const char *locale_enc = gettext_init.GetEncoding();
 + 	iconv_t cd = iconv_open("UTF-8", locale_enc);
 +-	char *in_buf = const_cast<char *>(&text_locally_encoded[0]);
 ++	const char *in_buf = const_cast<char *>(&text_locally_encoded[0]);
 + 	char *out_buf = &text_utf8[0];
 + 	iconv(cd, &in_buf, &text_length, &out_buf, &text_utf8_length);
 + 	iconv_close(cd);
 --- c.diff ends here ---



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?201008291420.o7TEK2wS095437>