summaryrefslogtreecommitdiff
path: root/www/firefox/files/patch-bug836824
blob: 807015baa616cbe2d8da802420e9e3076c831e92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
commit 35107a0 (HEAD)
Author: Paul Adenot <paul@paul.cx>
Date:   Mon Feb 4 20:21:19 2013 +0100

    Bug 836824 - libsoundtouch fails to build due to __get_cpuid() invocation, if you don't have xcode command line tools. r=
---
 media/libsoundtouch/moz-libsoundtouch.patch | 24 ++++++++++++++++++++++++
 media/libsoundtouch/src/cpu_detect_x86.cpp  |  5 ++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git media/libsoundtouch/src/cpu_detect_x86.cpp media/libsoundtouch/src/cpu_detect_x86.cpp
index a42008e..7a31aa9 100644
--- media/libsoundtouch/src/cpu_detect_x86.cpp
+++ media/libsoundtouch/src/cpu_detect_x86.cpp
@@ -101,7 +101,7 @@ uint detectCPUextensions(void)
  
     uint res = 0;
  
-#if defined(__GNUC__)
+#if defined(__GNUC__) && defined(HAVE_CPUID_H)
     // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support.
     uint eax, ebx, ecx, edx;  // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable.
 
@@ -112,6 +112,9 @@ uint detectCPUextensions(void)
     if (edx & bit_SSE)  res = res | SUPPORT_SSE;
     if (edx & bit_SSE2) res = res | SUPPORT_SSE2;
 
+#elif defined(__GNUC__)
+    // No cpuid.h --> no cpuid support
+    return 0;
 #else
     // Window / VS version of cpuid. Notice that Visual Studio 2005 or later required 
     // for __cpuid intrinsic support.