[BACK]Return to patch-pan_usenet-utils_mime-utils.cc CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / news / pan / patches

File: [cvs.NetBSD.org] / pkgsrc / news / pan / patches / patch-pan_usenet-utils_mime-utils.cc (download)

Revision 1.2, Fri Jul 13 08:16:00 2012 UTC (9 years, 4 months ago) by marino
Branch: MAIN
CVS Tags: pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3
Changes since 1.1: +7 -4 lines

news/pan: break caused by NetBSD iconv patch

There have been several packages with patches that directly change an
iconv function without the use of a __NetBSD__ macro.  This is a NetBSD-
specific modification and changing iconv to match the NetBSD prototype
breaks the package on other platforms.

$NetBSD: patch-pan_usenet-utils_mime-utils.cc,v 1.2 2012/07/13 08:16:00 marino Exp $

Fix build with NetBSD's iconv().

--- pan/usenet-utils/mime-utils.cc.orig	2012-06-29 22:24:54.000000000 +0000
+++ pan/usenet-utils/mime-utils.cc
@@ -77,7 +77,11 @@ namespace pan
       outbuf = out + converted;
       outleft = outlen - converted;
 
+#if defined(__NetBSD__)
+      converted = iconv (cd, (const char **) &inbuf, &inleft, &outbuf, &outleft);
+#else
       converted = iconv (cd, (char **) &inbuf, &inleft, &outbuf, &outleft);
+#endif
 
       if (converted != (size_t) -1 && errno == 0) {
         /*