[vlc-devel] [PATCH] contrib: sidplay2: fix signed char stored as int8_t
Steve Lhomme
robux4 at ycbcr.xyz
Thu Jan 9 10:48:42 CET 2020
Fixes compilation with gcc 9 for Raspberry
---
contrib/src/sidplay2/rules.mak | 1 +
contrib/src/sidplay2/sidplay2-char-cast.patch | 22 +++++++++++++++++++
2 files changed, 23 insertions(+)
create mode 100644 contrib/src/sidplay2/sidplay2-char-cast.patch
diff --git a/contrib/src/sidplay2/rules.mak b/contrib/src/sidplay2/rules.mak
index 84c35ccfee7..de77935774a 100644
--- a/contrib/src/sidplay2/rules.mak
+++ b/contrib/src/sidplay2/rules.mak
@@ -25,6 +25,7 @@ sidplay-libs: sidplay-libs-$(SID_VERSION).tar.gz .sum-sidplay2
$(APPLY) $(SRC)/sidplay2/sidplay2-string.patch
$(APPLY) $(SRC)/sidplay2/sidplay-fix-ln-s.patch
$(APPLY) $(SRC)/sidplay2/sidplay2-resid-dependency.patch
+ $(APPLY) $(SRC)/sidplay2/sidplay2-char-cast.patch
$(MOVE)
.sidplay2: sidplay-libs
diff --git a/contrib/src/sidplay2/sidplay2-char-cast.patch b/contrib/src/sidplay2/sidplay2-char-cast.patch
new file mode 100644
index 00000000000..a16898945fa
--- /dev/null
+++ b/contrib/src/sidplay2/sidplay2-char-cast.patch
@@ -0,0 +1,22 @@
+--- sidplay-libs/libsidplay/src/xsid/xsid.cpp.char 2020-01-08 14:09:08.124096200 +0100
++++ sidplay-libs/libsidplay/src/xsid/xsid.cpp 2020-01-08 14:09:16.204111900 +0100
+@@ -94,7 +94,7 @@ const int8_t XSID::sampleConvertTable[16
+ '\x08', '\x19', '\x2a', '\x3b', '\x4c', '\x5d', '\x6e', '\x7f'
+ };
+ */
+-const int8_t XSID::sampleConvertTable[16] =
++const char XSID::sampleConvertTable[16] =
+ {
+ '\x80', '\x94', '\xa9', '\xbc', '\xce', '\xe1', '\xf2', '\x03',
+ '\x1b', '\x2a', '\x3b', '\x49', '\x58', '\x66', '\x73', '\x7f'
+--- sidplay-libs/libsidplay/src/xsid/xsid.h.char 2020-01-08 14:09:08.933730400 +0100
++++ sidplay-libs/libsidplay/src/xsid/xsid.h 2020-01-08 14:09:13.984227000 +0100
+@@ -238,7 +238,7 @@ private:
+ uint8_t sidData0x18;
+ bool _sidSamples;
+ int8_t sampleOffset;
+- static const int8_t sampleConvertTable[16];
++ static const char sampleConvertTable[16];
+ bool wasRunning;
+
+ private:
--
2.17.1
More information about the vlc-devel
mailing list