diff options
-rw-r--r-- | recipes/spandsp.recipe | 2 | ||||
-rw-r--r-- | recipes/spandsp/0001-Fix-build-for-windows-using-mingw.patch | 40 |
2 files changed, 42 insertions, 0 deletions
diff --git a/recipes/spandsp.recipe b/recipes/spandsp.recipe index 5cdad0c5..97e4b430 100644 --- a/recipes/spandsp.recipe +++ b/recipes/spandsp.recipe @@ -18,3 +18,5 @@ class Recipe(recipe.Recipe): if self.config.arch != self.config.target_arch: self.new_env['ac_cv_func_malloc_0_nonnull'] = 'yes' self.new_env['ac_cv_func_realloc_0_nonnull'] = 'yes' + if self.config.target_platform == Platform.WINDOWS: + self.patches += ['spandsp/0001-Fix-build-for-windows-using-mingw.patch'] diff --git a/recipes/spandsp/0001-Fix-build-for-windows-using-mingw.patch b/recipes/spandsp/0001-Fix-build-for-windows-using-mingw.patch new file mode 100644 index 00000000..c21de497 --- /dev/null +++ b/recipes/spandsp/0001-Fix-build-for-windows-using-mingw.patch @@ -0,0 +1,40 @@ +From a4941856fe595f8090caf229fc52a41f430d8002 Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne <nicolas.dufresne@collabora.com> +Date: Sat, 3 Oct 2015 19:44:00 +0100 +Subject: [PATCH] Fix build for windows using mingw + +--- + src/spandsp/telephony.h | 2 ++ + src/t4_rx.c | 3 +++ + 2 files changed, 5 insertions(+) + +diff --git a/src/spandsp/telephony.h b/src/spandsp/telephony.h +index 49d7200..8614c75 100644 +--- a/src/spandsp/telephony.h ++++ b/src/spandsp/telephony.h +@@ -26,6 +26,8 @@ + #if !defined(_SPANDSP_TELEPHONY_H_) + #define _SPANDSP_TELEPHONY_H_ + ++#define LIBSPANDSP_EXPORTS 1 ++ + #if defined(_M_IX86) || defined(_M_X64) + #if defined(LIBSPANDSP_EXPORTS) + #define SPAN_DECLARE(type) __declspec(dllexport) type __stdcall +diff --git a/src/t4_rx.c b/src/t4_rx.c +index eb24bf1..b0f7490 100644 +--- a/src/t4_rx.c ++++ b/src/t4_rx.c +@@ -60,6 +60,9 @@ + #include "config.h" + #endif + ++/* Avoid including winsock2.h */ ++extern int __stdcall gethostname(char * name, int namelen); ++ + #include <stdlib.h> + #include <inttypes.h> + #include <limits.h> +-- +2.4.3 + |