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:26:02 +0100 |
commit | 80b4eb9e12ccf815261f6a67fd9b8d97717e82d5 (patch) | |
tree | fb1c6dd531129d6af6a663ab025d4b13e06c9543 /meta/recipes-multimedia/alsa/alsa-lib | |
parent | ad98f2bfa2c6ebb53b9c1fa4afad8842ab65062c (diff) | |
download | openembedded-core-80b4eb9e12ccf815261f6a67fd9b8d97717e82d5.tar.gz openembedded-core-80b4eb9e12ccf815261f6a67fd9b8d97717e82d5.tar.bz2 openembedded-core-80b4eb9e12ccf815261f6a67fd9b8d97717e82d5.zip |
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.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
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 @@ +Upstream-Status: Backport + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001 +From: Kai Kang <jiashuo.kang at gmail.com> +Date: Thu, 15 Aug 2013 17:17:19 +0800 +Subject: [PATCH] Update iatomic.h functions definitions 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. + +Signed-off-by: Kai Kang <jiashuo.kang at gmail.com> +Signed-off-by: Takashi Iwai <tiwai@suse.de> +--- + include/iatomic.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/include/iatomic.h b/include/iatomic.h +index 5711fe8..2393297 100644 +--- a/include/iatomic.h ++++ b/include/iatomic.h +@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t; + * Atomically adds @i to @v. Note that the guaranteed useful range + * of an atomic_t is only 24 bits. + */ +-extern __inline__ void atomic_add(int i, atomic_t * v) ++static __inline__ void atomic_add(int i, atomic_t * v) + { + unsigned long temp; + +@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v) + * Atomically subtracts @i from @v. Note that the guaranteed + * useful range of an atomic_t is only 24 bits. + */ +-extern __inline__ void atomic_sub(int i, atomic_t * v) ++static __inline__ void atomic_sub(int i, atomic_t * v) + { + unsigned long temp; + +@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v) + /* + * Same as above, but return the result value + */ +-extern __inline__ int atomic_add_return(int i, atomic_t * v) ++static __inline__ int atomic_add_return(int i, atomic_t * v) + { + unsigned long temp, result; + +@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v) + return result; + } + +-extern __inline__ int atomic_sub_return(int i, atomic_t * v) ++static __inline__ int atomic_sub_return(int i, atomic_t * v) + { + unsigned long temp, result; + +-- +1.8.1.2 + |