Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | audioresample: Fix build on x86 if emmintrin.h is available but can't be used |
| 2 | |
| 3 | On x86, EMMINTRIN is defined but not usable without SSE so check for |
| 4 | __SSE__ and __SSE2__ as well. |
| 5 | |
| 6 | https://bugzilla.gnome.org/show_bug.cgi?id=670690 |
| 7 | |
| 8 | Upstream-Status: Backport |
| 9 | |
| 10 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> |
| 11 | --- |
| 12 | gst/audioresample/resample.c | 4 ++-- |
| 13 | 1 files changed, 2 insertions(+), 2 deletions(-) |
| 14 | |
| 15 | diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c |
| 16 | index 98d006c..481fa01 100644 |
| 17 | --- a/gst/audioresample/resample.c |
| 18 | +++ b/gst/audioresample/resample.c |
| 19 | @@ -77,13 +77,13 @@ |
| 20 | #define EXPORT G_GNUC_INTERNAL |
| 21 | |
| 22 | #ifdef _USE_SSE |
| 23 | -#ifndef HAVE_XMMINTRIN_H |
| 24 | +#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H) |
| 25 | #undef _USE_SSE |
| 26 | #endif |
| 27 | #endif |
| 28 | |
| 29 | #ifdef _USE_SSE2 |
| 30 | -#ifndef HAVE_EMMINTRIN_H |
| 31 | +#if !defined(__SSE2__) || !defined(HAVE_EMMINTRIN_H) |
| 32 | #undef _USE_SSE2 |
| 33 | #endif |
| 34 | #endif |
| 35 | -- |
| 36 | 1.7.1 |
| 37 | |