From 517cc513318cc9db64bfaef3eee742229cc8801c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 1 Sep 2010 08:34:34 +0000 Subject: [PATCH] Making alsa build on mips with a patch svn path=/nixpkgs/branches/stdenv-updates/; revision=23575 --- pkgs/os-specific/linux/alsa-lib/default.nix | 5 +++ .../linux/alsa-lib/mips-atomic.patch | 39 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/os-specific/linux/alsa-lib/mips-atomic.patch diff --git a/pkgs/os-specific/linux/alsa-lib/default.nix b/pkgs/os-specific/linux/alsa-lib/default.nix index aaa714d8d590..5ebf52644398 100644 --- a/pkgs/os-specific/linux/alsa-lib/default.nix +++ b/pkgs/os-specific/linux/alsa-lib/default.nix @@ -39,5 +39,10 @@ stdenv.mkDerivation rec { See http://thread.gmane.org/gmane.linux.distributions.nixos/3435 */ ./alsa-plugin-dirs.patch + + /* patch provided by larsc on irc. + it may be a compiler problem on mips; without this, alsa does not build + on mips, because lacks some symbols atomic_add/atomic_sub */ + ./mips-atomic.patch ]; } diff --git a/pkgs/os-specific/linux/alsa-lib/mips-atomic.patch b/pkgs/os-specific/linux/alsa-lib/mips-atomic.patch new file mode 100644 index 000000000000..3af7c5d4debf --- /dev/null +++ b/pkgs/os-specific/linux/alsa-lib/mips-atomic.patch @@ -0,0 +1,39 @@ +diff --git a/include/iatomic.h b/include/iatomic.h +index e92dbfd..364bc5c 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;