トップ 差分 一覧 Farm ソース 検索 ヘルプ PDF RSS ログイン

Diary/2026-3-17

MxLinux で lookup

MxLinux 25でもlookupが使いたいので,eb,eblock,lookupをビルド.
ebのビルド時に

puts_eucjp.c: In function ‘fputs_eucjp_to_locale’:
puts_eucjp.c:97:23: error: passing argument 2 of ‘iconv’ from incompatible pointer type [-Wincompatible-pointer-types]
   97 |         if (iconv(cd, &in_p, &in_left, &out_p, &out_left) != -1)
      |                       ^~~~~
      |                       |
      |                       const char **
In file included from puts_eucjp.c:40:
/usr/include/iconv.h:49:54: note: expected ‘char ** restrict’ but argument is of type ‘const char **’
   49 | extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
      |                                    ~~~~~~~~~~~~~~~~~~^~~~~~~
make[3]: *** [Makefile:288: puts_eucjp.o] エラー 1

というエラーに遭遇したので,雑に,char ** restrict,にキャスト.

puts_eucjp.c.patch(1)

patch -p0 < puts_eucjp.c.patch

してmake.とりあえず,使えてはいる.