Patchwork [4/4] alsa-utils_1.0.24.2.bb: Fix build for uclibc targets

login
register
mail settings
Submitter Khem Raj
Date April 30, 2011, 10:07 p.m.
Message ID <f79ca6085cffcc03b657191214f5a5a301adb2eb.1304200899.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/3051/
State New, archived
Headers show

Comments

Khem Raj - April 30, 2011, 10:07 p.m.
uclibc does not have exp10() implemented so we obtain
same behaviour using pow()

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../uclibc-exp10-replacement.patch                 |   21 ++++++++++++++++++++
 .../recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb |    4 ++-
 2 files changed, 24 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch
Otavio Salvador - May 1, 2011, 10:56 p.m.
On Sat, Apr 30, 2011 at 19:07, Khem Raj <raj.khem@gmail.com> wrote:
...
> +uclibc does not have exp10 function which is glibc extension.
> +Bur we can get the same behavior by using pow()
...

Typo! s/Bur/But/

Patch

diff --git a/meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch b/meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch
new file mode 100644
index 0000000..038c90d
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch
@@ -0,0 +1,21 @@ 
+uclibc does not have exp10 function which is glibc extension.
+Bur we can get the same behavior by using pow()
+
+Upstream-status: Pending
+
+Khem Raj <raj.khem@gmail.com>
+
+Index: alsa-utils-1.0.24.2/alsamixer/volume_mapping.c
+===================================================================
+--- alsa-utils-1.0.24.2.orig/alsamixer/volume_mapping.c
++++ alsa-utils-1.0.24.2/alsamixer/volume_mapping.c
+@@ -36,6 +36,9 @@
+ #include <math.h>
+ #include <stdbool.h>
+ #include "volume_mapping.h"
++#ifdef __UCLIBC__
++#define exp10(x) (pow(10, (x)))
++#endif /* __UCLIBC__ */
+ 
+ #define MAX_LINEAR_DB_SCALE	24
+ 
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb
index c882bfd..4cb31a9 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb
@@ -9,7 +9,9 @@  DEPENDS = "alsa-lib ncurses"
 PR = "r0"
 
 SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
-           file://ncursesfix.patch"
+           file://ncursesfix.patch \
+           file://uclibc-exp10-replacement.patch \
+          "
 
 SRC_URI[md5sum] = "8238cd57cb301d1c36bcf0ecb59ce6b2"
 SRC_URI[sha256sum] = "95127f740291086486c06c28118cabca0814bde48fd14dac041a9812a5ac1be2"