1Fix building against libiconv 2 3Downloaded from 4https://github.com/kyak/openwrt-packages/blob/master/fbterm/patches/001-iconv.patch 5 6Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> 7 8--- a/src/lib/io.cpp 9+++ b/src/lib/io.cpp 10@@ -119,10 +119,10 @@ void IoPipe::setCodec(const s8 *up, cons 11 if (!strcasecmp(up, down)) return; 12 13 mCodecRead = iconv_open(up, down); 14- if (mCodecRead == (void*)-1) mCodecRead = 0; 15+ if (mCodecRead == (iconv_t)(-1)) mCodecRead = 0; 16 17 mCodecWrite = iconv_open(down, up); 18- if (mCodecWrite == (void*)-1) mCodecWrite = 0; 19+ if (mCodecWrite == (iconv_t)(-1)) mCodecWrite = 0; 20 } 21 22 #define BUF_SIZE 10240 23--- a/src/lib/io.h 24+++ b/src/lib/io.h 25@@ -23,6 +23,7 @@ 26 27 #include "type.h" 28 #include "instance.h" 29+#include <iconv.h> 30 31 class IoPipe { 32 public: 33@@ -47,7 +48,7 @@ private: 34 void writeIo(s8 *buf, u32 len); 35 36 s32 mFd; 37- void *mCodecRead, *mCodecWrite; 38+ iconv_t mCodecRead, mCodecWrite; 39 s8 mBufRead[16], mBufWrite[16]; 40 u32 mBufLenRead, mBufLenWrite; 41 }; 42