$NetBSD: patch-ba,v 1.1 2006/10/18 13:11:59 rillig Exp $ SunPro interprets the original code as "extern C" pointer to "extern C" functions, which conflicts with the definition of the functions. --- apu.h.orig 2004-12-30 23:15:47.000000000 +0100 +++ apu.h 2006-10-18 13:50:59.265817188 +0200 @@ -150,6 +150,9 @@ STATIC inline void S9xAPUPackStatus() (IAPU._Zero & 0x80) | (IAPU._Overflow << 6); } +/* Note: This must be outside the "extern" block. */ +typedef void (*S9xApuOpcodeFunction)(void); + START_EXTERN_C void S9xResetAPU (void); bool8 S9xInitAPU (); @@ -167,7 +170,7 @@ void S9xOpenCloseSoundTracingFile (bool8 void S9xPrintAPUState (); extern int32 S9xAPUCycles [256]; // Scaled cycle lengths extern int32 S9xAPUCycleLengths [256]; // Raw data. -extern void (*S9xApuOpcodes [256]) (void); +extern S9xApuOpcodeFunction S9xApuOpcodes[256]; END_EXTERN_C