OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
1 | --- a/src/lib/io.cpp |
2 | +++ b/src/lib/io.cpp |
3 | @@ -119,10 +119,10 @@ void IoPipe::setCodec(const s8 *up, cons |
4 | if (!strcasecmp(up, down)) return; |
5 | |
6 | mCodecRead = iconv_open(up, down); |
7 | - if (mCodecRead == (void*)-1) mCodecRead = 0; |
8 | + if (mCodecRead == (iconv_t)(-1)) mCodecRead = 0; |
9 | |
10 | mCodecWrite = iconv_open(down, up); |
11 | - if (mCodecWrite == (void*)-1) mCodecWrite = 0; |
12 | + if (mCodecWrite == (iconv_t)(-1)) mCodecWrite = 0; |
13 | } |
14 | |
15 | #define BUF_SIZE 10240 |
16 | --- a/src/lib/io.h |
17 | +++ b/src/lib/io.h |
18 | @@ -23,6 +23,7 @@ |
19 | |
20 | #include "type.h" |
21 | #include "instance.h" |
22 | +#include <iconv.h> |
23 | |
24 | class IoPipe { |
25 | public: |
26 | @@ -47,7 +48,7 @@ private: |
27 | void writeIo(s8 *buf, u32 len); |
28 | |
29 | s32 mFd; |
30 | - void *mCodecRead, *mCodecWrite; |
31 | + iconv_t mCodecRead, mCodecWrite; |
32 | s8 mBufRead[16], mBufWrite[16]; |
33 | u32 mBufLenRead, mBufLenWrite; |
34 | }; |
35 |