]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Update iatomic.h functions definitions for mips
authorKai Kang <jiashuo.kang at gmail.com>
Thu, 15 Aug 2013 09:17:19 +0000 (17:17 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 22 Aug 2013 08:40:32 +0000 (10:40 +0200)
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

index 5711fe8d1431fb54af4c093909361ccf2c8fb049..2393297557ccc823060079b5162fa2a24104b530 100644 (file)
@@ -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;