From e1579c624ffd9e4f480084ef982282268023552e Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 5 Nov 2017 19:50:04 +0100
Subject: gcc2 fixes.


diff --git a/frontend/main.c b/frontend/main.c
index c2c4f9b..bd624fa 100644
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -438,6 +438,7 @@ int main(int argc, char *argv[])
     char *faac_copyright_string;
     int ignorelen = FALSE;
     int verbose = 1;
+    int showcnt = 0;
 
 #ifndef _WIN32
     // install signal handler
@@ -963,7 +964,6 @@ int main(int argc, char *argv[])
         break;
     }
 
-    int showcnt = 0;
 #ifdef _WIN32
     long begin = GetTickCount();
 #endif
diff --git a/frontend/mp4write.c b/frontend/mp4write.c
index a1e70d9..43138a6 100644
--- a/frontend/mp4write.c
+++ b/frontend/mp4write.c
@@ -46,11 +46,13 @@ mp4config_t mp4config = { 0 };
 
 static FILE *g_fout = NULL;
 
+#include <support/ByteOrder.h>
+
 static inline uint32_t bswap32(uint32_t u32)
 {
 #ifndef WORDS_BIGENDIAN
     //return __bswap_32(u32);
-    return __builtin_bswap32(u32);
+    return __swap_int32(u32);
 #endif
 }
 
@@ -58,7 +60,7 @@ static inline uint16_t bswap16(uint16_t u16)
 {
 #ifndef WORDS_BIGENDIAN
     //return __bswap_16(u16);
-    return __builtin_bswap16(u16);
+    return __swap_int16(u16);
 #endif
 }
 
@@ -709,7 +711,7 @@ static creator_t g_tail[] = {
 static creator_t *g_atom = 0;
 static int create(void)
 {
-    long apos = ftell(g_fout);;
+    long apos = ftell(g_fout);
     int size;
 
     size = u32out(8);
diff --git a/libfaac/Makefile.am b/libfaac/Makefile.am
index 722cd32..43cfc6b 100644
--- a/libfaac/Makefile.am
+++ b/libfaac/Makefile.am
@@ -2,8 +2,8 @@ lib_LTLIBRARIES = libfaac.la libfaac_drm.la
 
 libfaac_la_SOURCES = aacquant.c bitstream.c fft.c frame.c midside.c psychkni.c util.c backpred.c channels.c filtbank.c huffman.c ltp.c tns.c
 libfaac_la_INCLUDES = aacquant.h channels.h filtbank.h hufftab.h psych.h backpred.h coder.h frame.h midside.h tns.h bitstream.h fft.h huffman.h ltp.h util.h
-libfaac_la_LIBADD = -lm
-libfaac_la_CFLAGS = -fvisibility=hidden
+libfaac_la_LIBADD = 
+libfaac_la_CFLAGS = 
 libfaac_drm_la_SOURCES = ${libfaac_la_SOURCES} kiss_fft/kiss_fftr.c kiss_fft/kiss_fft.c
 libfaac_drm_la_INCLUDES = ${libfaac_la_INCLUDES}
 libfaac_drm_la_LIBADD = ${libfaac_la_LIBADD}
-- 
2.14.3

