0004-iconv.patch 997 B

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