alsa-utils: bump to 1.0.24.2
authorChih-Min Chao <cmchao@gmail.com>
Fri, 11 Mar 2011 08:13:28 +0000 (16:13 +0800)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 14 Mar 2011 08:49:41 +0000 (09:49 +0100)
[Peter: fix exp10 breakage on uClibc]
Signed-off-by: Chih-Min Chao <cmchao@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/multimedia/alsa-utils/alsa-utils-exp10-workaround.patch [new file with mode: 0644]
package/multimedia/alsa-utils/alsa-utils.mk

diff --git a/package/multimedia/alsa-utils/alsa-utils-exp10-workaround.patch b/package/multimedia/alsa-utils/alsa-utils-exp10-workaround.patch
new file mode 100644 (file)
index 0000000..f4a520a
--- /dev/null
@@ -0,0 +1,33 @@
+From da14c5ab2a6e030c5c56c979b8eb3ca071890876 Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <jacmet@sunsite.dk>
+Date: Mon, 14 Mar 2011 09:19:18 +0100
+Subject: [PATCH] alsamixer: fix build on uClibc
+
+exp10 is a glibc extension, which isn't supported on uClibc. Luckily,
+exp10() is trivial to compute based on exp(), so add a wrapper for
+the uClibc case.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ alsamixer/volume_mapping.c |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/alsamixer/volume_mapping.c b/alsamixer/volume_mapping.c
+index 9cacad8..1c0d7c4 100644
+--- a/alsamixer/volume_mapping.c
++++ b/alsamixer/volume_mapping.c
+@@ -37,6 +37,11 @@
+ #include <stdbool.h>
+ #include "volume_mapping.h"
++#ifdef __UCLIBC__
++/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
++#define exp10(x) (exp((x) * log(10)))
++#endif /* __UCLIBC__ */
++
+ #define MAX_LINEAR_DB_SCALE   24
+ static inline bool use_linear_dB_scale(long dBmin, long dBmax)
+-- 
+1.7.2.3
+
index 4ab49d3d63cb5a2390fa16940e22fc6babef27ec..26c270bac4546c8a53f3e705a93d7502bc7d3dd8 100644 (file)
@@ -3,7 +3,7 @@
 # alsa-utils
 #
 #############################################################
-ALSA_UTILS_VERSION = 1.0.23
+ALSA_UTILS_VERSION = 1.0.24.2
 ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
 ALSA_UTILS_SITE = ftp://ftp.alsa-project.org/pub/utils
 ALSA_UTILS_INSTALL_STAGING = YES