pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
libretro-citra: Fix iconv usage on netbsd
Module Name: pkgsrc-wip
Committed By: Nia Alarie <nia.alarie%gmail.com@localhost>
Pushed By: nee
Date: Tue Jun 5 18:09:16 2018 +0100
Changeset: 1f569dd4c13efb3d05cb6910bfe3dc6bde4ca28e
Modified Files:
libretro-citra/distinfo
Added Files:
libretro-citra/patches/patch-src_common_string__util.cpp
Log Message:
libretro-citra: Fix iconv usage on netbsd
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=1f569dd4c13efb3d05cb6910bfe3dc6bde4ca28e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
libretro-citra/distinfo | 1 +
.../patches/patch-src_common_string__util.cpp | 45 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
diffs:
diff --git a/libretro-citra/distinfo b/libretro-citra/distinfo
index c15b4d0508..afc198a220 100644
--- a/libretro-citra/distinfo
+++ b/libretro-citra/distinfo
@@ -50,3 +50,4 @@ SHA512 (fd69de1a1b960ec296cc67d32257b0f9e2d89ac6.tar.gz) = 2bfe22a83054871ac5409
Size (fd69de1a1b960ec296cc67d32257b0f9e2d89ac6.tar.gz) = 110454 bytes
SHA1 (patch-externals_cryptopp_cryptopp_config.h) = d11cc8324caeb5c13e40715b1bb970307c40f80b
SHA1 (patch-externals_dynarmic_CMakeLists.txt) = 6e1fe92e7a8793e45e6d4fcd009164be16c39a9c
+SHA1 (patch-src_common_string__util.cpp) = 57f0015b0f78a0c33d79ca9323ab2cb5491ae873
diff --git a/libretro-citra/patches/patch-src_common_string__util.cpp b/libretro-citra/patches/patch-src_common_string__util.cpp
new file mode 100644
index 0000000000..a00eb9bd89
--- /dev/null
+++ b/libretro-citra/patches/patch-src_common_string__util.cpp
@@ -0,0 +1,45 @@
+$NetBSD$
+
+error: invalid conversion from 'char**' to 'const char**'
+
+--- src/common/string_util.cpp.orig 2018-05-19 11:54:21.000000000 +0000
++++ src/common/string_util.cpp
+@@ -359,14 +359,26 @@ static std::string CodeToUTF8(const char
+ std::string out_buffer;
+ out_buffer.resize(out_buffer_size);
+
++#ifdef __NetBSD__
++ const char* src_buffer = (const char*)(&input[0]);
++ size_t src_bytes = in_bytes;
++ char* dst_buffer = (char*)(&out_buffer[0]);
++ size_t dst_bytes = out_buffer.size();
++#else
+ auto src_buffer = &input[0];
+ size_t src_bytes = in_bytes;
+ auto dst_buffer = &out_buffer[0];
+ size_t dst_bytes = out_buffer.size();
++#endif
+
+ while (0 != src_bytes) {
++#ifndef __NetBSD__
+ size_t const iconv_result =
+ iconv(conv_desc, (char**)(&src_buffer), &src_bytes, &dst_buffer, &dst_bytes);
++#else
++ size_t const iconv_result =
++ iconv(conv_desc, &src_buffer, &src_bytes, &dst_buffer, &dst_bytes);
++#endif
+
+ if (static_cast<size_t>(-1) == iconv_result) {
+ if (EILSEQ == errno || EINVAL == errno) {
+@@ -407,7 +419,11 @@ std::u16string UTF8ToUTF16(const std::st
+ std::u16string out_buffer;
+ out_buffer.resize(out_buffer_size);
+
++#ifdef __NetBSD__
++ const char* src_buffer = (const char*)(&input[0]);
++#else
+ char* src_buffer = const_cast<char*>(&input[0]);
++#endif
+ size_t src_bytes = in_bytes;
+ char* dst_buffer = (char*)(&out_buffer[0]);
+ size_t dst_bytes = out_buffer.size();
Home |
Main Index |
Thread Index |
Old Index