summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-04-12 20:08:35 +0900
committerTim-Philipp Müller <tim@centricular.com>2021-04-13 01:45:53 +0100
commit45f8301b8afaf099632efa5815b55be2f0eba4d1 (patch)
tree3af0e12cfa5f421c54adb36eabd060b3d0184687
parent902ab24466387cb87a09350400b4a9194a481a9b (diff)
spandsp: Fix build error with Visual Studio 2019
We don't build spandsp library using MSVC but spandsp plugin is built by using MSVC. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/697>
-rw-r--r--recipes/spandsp.recipe6
-rw-r--r--recipes/spandsp/0001-FS-6010-resolve.patch48
2 files changed, 53 insertions, 1 deletions
diff --git a/recipes/spandsp.recipe b/recipes/spandsp.recipe
index 2ba100bc..5034b60f 100644
--- a/recipes/spandsp.recipe
+++ b/recipes/spandsp.recipe
@@ -16,7 +16,11 @@ class Recipe(recipe.Recipe):
'spandsp/0003-Use-BUILT_SOURCES-to-generate-extra-headers.patch',
'spandsp/0001-Don-t-do-a-whereis-which-dance-to-find-which.patch',
'spandsp/0001-Make-the-public-API-accessible-from-MSVC.patch',
- 'spandsp/0001-Delete-redundant-function-prototype-in-header.patch',]
+ 'spandsp/0001-Delete-redundant-function-prototype-in-header.patch',
+ # upstream commit
+ # https://github.com/freeswitch/spandsp/commit/9e00aa6e4718f21ddbac3ebac5248a504380c1f2
+ 'spandsp/0001-FS-6010-resolve.patch',
+ ]
files_libs = ['libspandsp']
files_devel = ['include/spandsp', 'include/spandsp.h', 'lib/pkgconfig/spandsp.pc']
diff --git a/recipes/spandsp/0001-FS-6010-resolve.patch b/recipes/spandsp/0001-FS-6010-resolve.patch
new file mode 100644
index 00000000..a4c3ffa0
--- /dev/null
+++ b/recipes/spandsp/0001-FS-6010-resolve.patch
@@ -0,0 +1,48 @@
+From ce03adee8dee58a25c9bfa6e137390e9c13d6ca2 Mon Sep 17 00:00:00 2001
+From: Jeff Lenk <jeff@jefflenk.com>
+Date: Fri, 29 Nov 2013 22:16:49 -0600
+Subject: [PATCH] FS-6010 --resolve
+
+---
+ src/spandsp/fast_convert.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/spandsp/fast_convert.h b/src/spandsp/fast_convert.h
+index 10679ea..af54e68 100644
+--- a/src/spandsp/fast_convert.h
++++ b/src/spandsp/fast_convert.h
+@@ -247,6 +247,7 @@ extern "C"
+ * Therefore implement inline versions of these functions here.
+ */
+
++#if (_MSC_VER < 1800)
+ __inline long int lrint(double x)
+ {
+ long int i;
+@@ -287,6 +288,7 @@ extern "C"
+ frndint
+ }
+ }
++#endif
+
+ __inline long int lfastrint(double x)
+ {
+@@ -316,6 +318,7 @@ extern "C"
+ /* x86_64 machines will do best with a simple assignment. */
+ #include <intrin.h>
+
++#if (_MSC_VER < 1800)
+ __inline long int lrint(double x)
+ {
+ return (long int)_mm_cvtsd_si64x( _mm_loadu_pd ((const double*)&x) );
+@@ -325,6 +328,7 @@ extern "C"
+ {
+ return _mm_cvt_ss2si( _mm_load_ss((const float*)&x) );
+ }
++#endif
+
+ __inline long int lfastrint(double x)
+ {
+--
+2.25.1
+