diff options
author | Kai Kang <kai.kang@windriver.com> | 2013-08-22 17:59:29 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-26 11:47:18 +0100 |
commit | 764784c9355ca696a92221ffa935fba61eff195d (patch) | |
tree | e0782cb6cb5fa8fd63aa0c5e16e0a17bd8ab02c9 /meta/recipes-multimedia/alsa/alsa-lib | |
parent | 26fe9762817ba13da4ac478aa484616ea9715580 (diff) | |
download | poky-764784c9355ca696a92221ffa935fba61eff195d.tar.gz |
alsa-lib: fix function definitions error for mips
Functions atomic_add(s) and atomic_sub(s) are defined with 'extern
__inline__' that may cause compile fails when cross compile for mips.
The error message looks like:
| pcm/.libs/libpcm.a(pcm_meter.o): In function
`snd_pcm_meter_update_scope':
| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to
`atomic_sub'
Replace the 'extern __inline__' with 'static __inline__' to fix this
issue.
(From OE-Core rev: 80b4eb9e12ccf815261f6a67fd9b8d97717e82d5)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-lib')
-rw-r--r-- | meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch b/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch new file mode 100644 index 0000000000..f1a7947c2b --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
4 | |||
5 | From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001 | ||
6 | From: Kai Kang <jiashuo.kang at gmail.com> | ||
7 | Date: Thu, 15 Aug 2013 17:17:19 +0800 | ||
8 | Subject: [PATCH] Update iatomic.h functions definitions for mips | ||
9 | |||
10 | Functions atomic_add(s) and atomic_sub(s) are defined with 'extern | ||
11 | __inline__' that may cause compile fails when cross compile for mips. | ||
12 | The error message looks like: | ||
13 | |||
14 | | pcm/.libs/libpcm.a(pcm_meter.o): In function `snd_pcm_meter_update_scope': | ||
15 | | .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to `atomic_sub' | ||
16 | |||
17 | Replace the 'extern __inline__' with 'static __inline__' to fix this | ||
18 | issue. | ||
19 | |||
20 | Signed-off-by: Kai Kang <jiashuo.kang at gmail.com> | ||
21 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
22 | --- | ||
23 | include/iatomic.h | 8 ++++---- | ||
24 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
25 | |||
26 | diff --git a/include/iatomic.h b/include/iatomic.h | ||
27 | index 5711fe8..2393297 100644 | ||
28 | --- a/include/iatomic.h | ||
29 | +++ b/include/iatomic.h | ||
30 | @@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t; | ||
31 | * Atomically adds @i to @v. Note that the guaranteed useful range | ||
32 | * of an atomic_t is only 24 bits. | ||
33 | */ | ||
34 | -extern __inline__ void atomic_add(int i, atomic_t * v) | ||
35 | +static __inline__ void atomic_add(int i, atomic_t * v) | ||
36 | { | ||
37 | unsigned long temp; | ||
38 | |||
39 | @@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v) | ||
40 | * Atomically subtracts @i from @v. Note that the guaranteed | ||
41 | * useful range of an atomic_t is only 24 bits. | ||
42 | */ | ||
43 | -extern __inline__ void atomic_sub(int i, atomic_t * v) | ||
44 | +static __inline__ void atomic_sub(int i, atomic_t * v) | ||
45 | { | ||
46 | unsigned long temp; | ||
47 | |||
48 | @@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v) | ||
49 | /* | ||
50 | * Same as above, but return the result value | ||
51 | */ | ||
52 | -extern __inline__ int atomic_add_return(int i, atomic_t * v) | ||
53 | +static __inline__ int atomic_add_return(int i, atomic_t * v) | ||
54 | { | ||
55 | unsigned long temp, result; | ||
56 | |||
57 | @@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v) | ||
58 | return result; | ||
59 | } | ||
60 | |||
61 | -extern __inline__ int atomic_sub_return(int i, atomic_t * v) | ||
62 | +static __inline__ int atomic_sub_return(int i, atomic_t * v) | ||
63 | { | ||
64 | unsigned long temp, result; | ||
65 | |||
66 | -- | ||
67 | 1.8.1.2 | ||
68 | |||