aboutsummaryrefslogtreecommitdiffstats
path: root/audio/nosefart
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-10-31 08:18:52 +0800
committermiwi <miwi@FreeBSD.org>2007-10-31 08:18:52 +0800
commit224195be203d7601e31804f7cb57124c46869bd6 (patch)
tree9c3da7be2b6633295901492b4a201fea0ad797a9 /audio/nosefart
parent6a050aa5613601903c271f5e5580b06fe69aca9e (diff)
downloadfreebsd-ports-gnome-224195be203d7601e31804f7cb57124c46869bd6.tar.gz
freebsd-ports-gnome-224195be203d7601e31804f7cb57124c46869bd6.tar.zst
freebsd-ports-gnome-224195be203d7601e31804f7cb57124c46869bd6.zip
- Fix build with gcc 4.2
PR: 117691 Submitted by: Pietro Cerutti (gahr@gahr.ch) Approved by: portmgr (erwin)
Diffstat (limited to 'audio/nosefart')
-rw-r--r--audio/nosefart/Makefile8
-rw-r--r--audio/nosefart/files/patch-src-sndhrdw-nes_apu.c25
2 files changed, 26 insertions, 7 deletions
diff --git a/audio/nosefart/Makefile b/audio/nosefart/Makefile
index 89f44ea81304..2c74056317ca 100644
--- a/audio/nosefart/Makefile
+++ b/audio/nosefart/Makefile
@@ -27,10 +27,4 @@ PLIST_FILES= bin/nosefart
pre-build:
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean)
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN= Does not compile with GCC 4.2
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/audio/nosefart/files/patch-src-sndhrdw-nes_apu.c b/audio/nosefart/files/patch-src-sndhrdw-nes_apu.c
new file mode 100644
index 000000000000..efa8af47ccea
--- /dev/null
+++ b/audio/nosefart/files/patch-src-sndhrdw-nes_apu.c
@@ -0,0 +1,25 @@
+--- src/sndhrdw/nes_apu.c.orig 2007-10-30 22:51:03.000000000 +0100
++++ src/sndhrdw/nes_apu.c 2007-10-30 22:52:28.000000000 +0100
+@@ -980,6 +980,9 @@
+ uint32 elapsed_cycles;
+ static int32 prev_sample = 0;
+ int32 next_sample, accum;
++ uint8 *buff_u8 = (uint8 *)buffer;
++ int16 *buff_16 = (int16 *)buffer;
++
+
+ ASSERT(apu);
+
+@@ -1035,9 +1038,9 @@
+
+ /* signed 16-bit output, unsigned 8-bit */
+ if (16 == apu->sample_bits)
+- *((int16 *) buffer)++ = (int16) accum;
+- else
+- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
++ *buff_16++ = (int16) accum;
++ else
++ *buff_u8++ = (accum >> 8) ^0x80;
+ }
+
+ /* resync cycle counter */