bbidulock / icewm

A window manager designed for speed, usability, and consistency
Other
597 stars 99 forks source link

iconv `inbuf` wants a const char ** #775

Closed ktnb-netbsd closed 6 months ago

ktnb-netbsd commented 6 months ago

This may be a NetBSD specific issue due to our version of iconv but any idea why this would happen? It can be fixed easily by casting the &inbuf to a char **.

ylocale.cc: In static member function 'static char* YLocale::localeString(const wchar_t*, size_t, size_t&)':
ylocale.cc:207:26: error: invalid conversion from 'const char**' to 'char**' [-fpermissive]
  207 |                          &inbuf, &inlen, &outbuf, &outlen);
         |                          ^~~~~~
         |                          |
         |                          const char**
In file included from ylocale.cc:27:
/usr/include/iconv.h:46:23: note:   initializing argument 2 of 'size_t iconv(iconv_t, char**, size_t*, char**, size_t*)'
   46 | size_t iconv(iconv_t, char ** __restrict,
        |                       ^
ylocale.cc: In static member function 'static wchar_t* YLocale::unicodeString(const char*, size_t, size_t&)':
ylocale.cc:242:26: error: invalid conversion from 'const char**' to 'char**' [-fpermissive]
  242 |                          &inbuf, &inlen, &outbuf, &outlen);
         |                          ^~~~~~
         |                          |
         |                          const char**
In file included from ylocale.cc:27:
/usr/include/iconv.h:46:23: note:   initializing argument 2 of 'size_t iconv(iconv_t, char**, size_t*, char**, size_t*)'
   46 | size_t iconv(iconv_t, char ** __restrict,
      |                       ^
gmake[2]: *** [Makefile:1763: ylocale.lo] Error 1