commit:     80650c5da099a7519597392dcc8b06fdd5eab413
Author:     Mark Wright <gienah <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  6 04:06:57 2024 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Thu Jun  6 04:10:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80650c5d

app-emulation/dosemu: Patch (by me) c99 error

Thanks to toralf for reporting. Fix compiler error:
mid_o_tmdty.c:80:35: error: passing argument 1 of pcm_write_interleaved
from incompatible pointer type [-Wincompatible-pointer-types]

Closes: https://bugs.gentoo.org/919387
Signed-off-by: Mark Wright <gienah <AT> gentoo.org>

 app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild       |  1 +
 ...107-pcm_write_interleaved-incompatiible-pointer-type.patch | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild 
b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild
index 33bcb2602637..bb6904b66047 100644
--- a/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild
+++ b/app-emulation/dosemu/dosemu-1.4.1_pre20130107-r5.ebuild
@@ -57,6 +57,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-lto.patch
        "${FILESDIR}"/${P}-as.patch
        "${FILESDIR}"/${P}-nm.patch
+       
"${FILESDIR}"/${P}-pcm_write_interleaved-incompatiible-pointer-type.patch
 )
 
 pkg_pretend() {

diff --git 
a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-pcm_write_interleaved-incompatiible-pointer-type.patch
 
b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-pcm_write_interleaved-incompatiible-pointer-type.patch
new file mode 100644
index 000000000000..15e2ac0fcf4d
--- /dev/null
+++ 
b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-pcm_write_interleaved-incompatiible-pointer-type.patch
@@ -0,0 +1,11 @@
+--- 
dosemu-code-15cfb41ff20a052769d753c3262c57ecb050ad71-orig/src/plugin/midimisc/mid_o_tmdty.c
        2013-01-07 10:44:22.000000000 +1100
++++ 
dosemu-code-15cfb41ff20a052769d753c3262c57ecb050ad71/src/plugin/midimisc/mid_o_tmdty.c
     2024-06-06 12:57:40.055442661 +1000
+@@ -77,7 +77,7 @@
+       if (n > 0) {
+           int frames = n / (pcm_format_size(fmt) * TMDTY_CHANS);
+           pcm_running = 1;
+-          pcm_write_interleaved(buf, frames, TMDTY_FREQ, fmt,
++          pcm_write_interleaved((sndbuf_t(*)[SNDBUF_CHANS])buf, frames, 
TMDTY_FREQ, fmt,
+                             TMDTY_CHANS, pcm_stream);
+       } else {
+           break;

Reply via email to