aboutsummaryrefslogtreecommitdiffstats
path: root/main/celt051/fix-gnuc-prereq.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-09 11:58:50 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-09 11:58:50 +0000
commit8f74060778d77defafcd1f9b817d59910d0f94b5 (patch)
treee2d16175cede23e02e1d48bf8da834e9396ab8e1 /main/celt051/fix-gnuc-prereq.patch
parentec1c0313f0d4e9dc7cca19421c0f60ce084797b6 (diff)
downloadaports-8f74060778d77defafcd1f9b817d59910d0f94b5.tar.bz2
aports-8f74060778d77defafcd1f9b817d59910d0f94b5.tar.xz
main/celt051: fix musl build
Diffstat (limited to 'main/celt051/fix-gnuc-prereq.patch')
-rw-r--r--main/celt051/fix-gnuc-prereq.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/celt051/fix-gnuc-prereq.patch b/main/celt051/fix-gnuc-prereq.patch
new file mode 100644
index 0000000000..5d2731492a
--- /dev/null
+++ b/main/celt051/fix-gnuc-prereq.patch
@@ -0,0 +1,20 @@
+--- celt-0.5.1.3.orig/libcelt/ecintrin.h
++++ celt-0.5.1.3/libcelt/ecintrin.h
+@@ -52,8 +52,7 @@
+ /*Count leading zeros.
+ This macro should only be used for implementing ec_ilog(), if it is defined.
+ All other code should use EC_ILOG() instead.*/
+-#ifdef __GNUC_PREREQ
+-#if __GNUC_PREREQ(3,4)
++#if defined(__GNUC__) && ((__GNUC__<<16)+__GNUC_MINOR__) >= 0x304
+ # if INT_MAX>=2147483647
+ # define EC_CLZ0 sizeof(unsigned)*CHAR_BIT
+ # define EC_CLZ(_x) (__builtin_clz(_x))
+@@ -61,7 +60,6 @@
+ # define EC_CLZ0 sizeof(unsigned long)*CHAR_BIT
+ # define EC_CLZ(_x) (__builtin_clzl(_x))
+ # endif
+-#endif
+ #endif
+
+ #if defined(EC_CLZ)