diff options
Diffstat (limited to 'sysutils/rkdeveloptool')
-rw-r--r-- | sysutils/rkdeveloptool/distinfo | 4 | ||||
-rw-r--r-- | sysutils/rkdeveloptool/patches/patch-main.cpp | 32 |
2 files changed, 30 insertions, 6 deletions
diff --git a/sysutils/rkdeveloptool/distinfo b/sysutils/rkdeveloptool/distinfo index 5e75f88569c..f2aa52ceba4 100644 --- a/sysutils/rkdeveloptool/distinfo +++ b/sysutils/rkdeveloptool/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.1 2018/08/31 10:09:51 tnn Exp $ +$NetBSD: distinfo,v 1.2 2019/10/25 10:10:10 kamil Exp $ SHA1 (rkdeveloptool-1.3-081d237ad5bf8f03170c9d60bd94ceefa0352aaf.tar.gz) = 20b22d5c172c5f651e2a49a4985708bd6d0cbcd6 RMD160 (rkdeveloptool-1.3-081d237ad5bf8f03170c9d60bd94ceefa0352aaf.tar.gz) = ce1f05a7d4cd38ae0b63e3a67826b604d925efea SHA512 (rkdeveloptool-1.3-081d237ad5bf8f03170c9d60bd94ceefa0352aaf.tar.gz) = cba3f9540b4fecbe3288a10c37294ddddcdb6572bed8085e4cf98328c0a4c651062399595cf92a3422268504d36835d52cac56f5e24a4eeb0639423372020ae4 Size (rkdeveloptool-1.3-081d237ad5bf8f03170c9d60bd94ceefa0352aaf.tar.gz) = 57003 bytes -SHA1 (patch-main.cpp) = c1115d44570cbf21084d3326f1fad32db101054f +SHA1 (patch-main.cpp) = 4cf466f12853a6158f5f299a7a0bdf593e7c0502 diff --git a/sysutils/rkdeveloptool/patches/patch-main.cpp b/sysutils/rkdeveloptool/patches/patch-main.cpp index 8f7feacd69e..29df354bb52 100644 --- a/sysutils/rkdeveloptool/patches/patch-main.cpp +++ b/sysutils/rkdeveloptool/patches/patch-main.cpp @@ -1,24 +1,48 @@ -$NetBSD: patch-main.cpp,v 1.1 2018/08/31 10:09:51 tnn Exp $ +$NetBSD: patch-main.cpp,v 1.2 2019/10/25 10:10:10 kamil Exp $ match iconv(3) prototype --- main.cpp.orig 2018-03-28 01:22:40.000000000 +0000 +++ main.cpp -@@ -168,7 +168,7 @@ bool StringToWideString(char *pszSrc, wc +@@ -15,6 +15,16 @@ + #include "RKComm.h" + #include "RKDevice.h" + #include "RKImage.h" ++ ++#if defined(__NetBSD__) ++#include <sys/param.h> ++#if __NetBSD_Prereq__(9,99,17) ++#define NETBSD_POSIX_ICONV 1 ++#else ++#define NETBSD_POSIX_ICONV 0 ++#endif ++#endif ++ + extern const char *szManufName[]; + CRKLog *g_pLogObject=NULL; + CONFIG_ITEM_VECTOR g_ConfigItemVec; +@@ -168,7 +178,11 @@ bool StringToWideString(char *pszSrc, wc pIn = (char *)pszSrc; pOut = (char *)pszDest; - iRet = iconv(cd, (char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen); ++#if defined(__NetBSD__) && !NETBSD_POSIX_ICONV + iRet = iconv(cd, (const char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen); ++#else ++ iRet = iconv(cd, &pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen); ++#endif if(iRet == -1) { delete []pszDest; -@@ -205,7 +205,7 @@ bool WideStringToString(wchar_t *pszSrc, +@@ -205,7 +219,11 @@ bool WideStringToString(wchar_t *pszSrc, char *pIn, *pOut; pIn = (char *)pszSrc; pOut = (char *)pszDest; -- iRet = iconv(cd, (char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen); ++#if defined(__NetBSD__) && !NETBSD_POSIX_ICONV + iRet = iconv(cd, (const char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen); ++#else + iRet = iconv(cd, (char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen); ++#endif if(iRet == -1) { delete []pszDest; |