From ab14520764785eb4d0364b8490ec007d2aaac229 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Tue, 9 Aug 2016 12:41:54 +0200 Subject: Handle NetBSD specific iconv(3) call prototype (#3376) In the past there were wars between constified and unconstified second parameter.. NetBSD went with constifying it. POSIX went without const and most other OSes standarized. NetBSD is still having incompatible function prototype. LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include size_t iconv(iconv_t cd, const char ** restrict src, size_t * restrict srcleft, char ** restrict dst, size_t * restrict dstleft); --- eglib/src/giconv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eglib/src/giconv.c b/eglib/src/giconv.c index a6f222dfe87..c7723fef5b4 100644 --- a/eglib/src/giconv.c +++ b/eglib/src/giconv.c @@ -199,8 +199,11 @@ g_iconv (GIConv cd, gchar **inbytes, gsize *inbytesleft, } else { outleftptr = NULL; } - +#if defined(__NetBSD__) + return iconv (cd->cd, (const gchar **)inbytes, inleftptr, outbytes, outleftptr); +#else return iconv (cd->cd, inbytes, inleftptr, outbytes, outleftptr); +#endif } #endif -- cgit v1.2.3