From f0af93204cac097fd85735d2aabb7a739bb5c786 Mon Sep 17 00:00:00 2001
From: Robert Kausch <robert.kausch@freac.org>
Date: Tue, 4 Dec 2018 20:46:05 +0000
Subject: Patches for Haiku compatibility.


diff --git a/configure.ac b/configure.ac
index 9b12f2c..9f9744d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_CHECK_PROGS(RPMBUILD, rpmbuild, rpm)
+AC_CHECK_LIBM
 
 AC_CONFIG_HEADERS([config.h])
 
diff --git a/libfaad/Makefile.am b/libfaad/Makefile.am
index 9105625..4d79c00 100644
--- a/libfaad/Makefile.am
+++ b/libfaad/Makefile.am
@@ -1,12 +1,11 @@
 lib_LTLIBRARIES = libfaad.la libfaad_drm.la
 
-AM_CPPFLAGS	= -iquote $(top_srcdir)/include
+AM_CPPFLAGS	= -I $(top_srcdir)/include
 include_HEADERS = $(top_srcdir)/include/faad.h \
 		  $(top_srcdir)/include/neaacdec.h
 
 libfaad_la_LDFLAGS = -version-info 2:0:0 -no-undefined
 libfaad_la_LIBADD = -lm
-libfaad_la_CFLAGS = -fvisibility=hidden
 
 libfaad_la_SOURCES = bits.c cfft.c decoder.c drc.c \
 		     drm_dec.c error.c filtbank.c \
-- 
2.30.0


From 36de2d100d7b710d0afa119fa5f6813e1947358a Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 23 Nov 2019 23:02:50 +0100
Subject: gcc2 fix


diff --git a/libfaad/hcr.c b/libfaad/hcr.c
index 4ae4809..7227ed0 100644
--- a/libfaad/hcr.c
+++ b/libfaad/hcr.c
@@ -225,7 +225,7 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
 
     uint16_t sp_offset[8];
     uint16_t g, i, sortloop, set, bitsread;
-    /*uint16_t bitsleft, codewordsleft*/;
+    /*uint16_t bitsleft, codewordsleft*/
     uint8_t w_idx, sfb, this_CB, last_CB, this_sec_CB;
 
     const uint16_t nshort = hDecoder->frameLength/8;
-- 
2.30.0

