diff options
author | Kamil Rytarowski <krytarowski@users.noreply.github.com> | 2016-08-09 13:41:54 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2016-08-09 13:41:54 +0300 |
commit | ab14520764785eb4d0364b8490ec007d2aaac229 (patch) | |
tree | 18842ab2edfbe5ef4f5e8fee2e7fe3c8739edbbe /eglib | |
parent | 1e6895d366a028e6db6da057e1741bf9ace8701d (diff) |
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 <iconv.h>
size_t
iconv(iconv_t cd, const char ** restrict src, size_t * restrict srcleft,
char ** restrict dst, size_t * restrict dstleft);
Diffstat (limited to 'eglib')
-rw-r--r-- | eglib/src/giconv.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 |