Add a workaround for a GCC 4.5 bug.
This patch adds a workaround to the AquariaPSPBuilder and oggtomp3 tools
to avoid a bug in GCC 4.5 which causes spurious compilation errors.
See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46028
--- a/PSP/tools/AquariaPSPBuilder.c Sat Dec 25 10:26:54 2010 +0900
+++ b/PSP/tools/AquariaPSPBuilder.c Sat Dec 25 10:34:40 2010 +0900
@@ -1794,7 +1794,9 @@
/* Encode the audio as MP3. */
const int blocksize = 8192;
+#define blocksize 8192 //Avoid a spurious error from GCC 4.5 (bugzilla #46028).
uint8_t mp3_buffer[blocksize*5/4 + 7200];
+#undef blocksize
uint32_t pos;
for (pos = 0; pos < num_samples; pos += blocksize) {
--- a/PSP/tools/oggtomp3.c Sat Dec 25 10:26:54 2010 +0900
+++ b/PSP/tools/oggtomp3.c Sat Dec 25 10:34:40 2010 +0900
@@ -204,7 +204,9 @@
/* Encode the audio as MP3 and write it to the output file. */
const int blocksize = 8192;
+#define blocksize 8192 //Avoid a spurious error from GCC 4.5 (bugzilla #46028).
uint8_t mp3_buffer[blocksize*5/4 + 7200];
+#undef blocksize
uint32_t pos;
for (pos = 0; pos < num_samples; pos += blocksize) {