$NetBSD: patch-ac,v 1.1 2007/09/29 11:31:09 rillig Exp $ Doing weird things in C requires weird code. Since gcc 4, casts return an rvalue instead of an lvalue. --- src/sndhrdw/nes_apu.c.orig 2003-05-04 20:39:04.000000000 +0200 +++ src/sndhrdw/nes_apu.c 2007-09-29 13:27:16.000000000 +0200 @@ -1035,9 +1035,9 @@ void apu_process(void *buffer, int num_s /* signed 16-bit output, unsigned 8-bit */ if (16 == apu->sample_bits) - *((int16 *) buffer)++ = (int16) accum; + *(*((int16 **) &buffer))++ = (int16) accum; else - *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80; + *(*((uint8 **) &buffer))++ = (accum >> 8) ^ 0x80; } /* resync cycle counter */