SHA256
1
0
forked from pool/alsa-utils
alsa-utils/0004-alsamixer-fix-build-on-uClibc.patch
Takashi Iwai 141a404e6c Accepting request 72632 from home:tiwai:branches:multimedia:libs
- Backport alsa-utils fixes from upstream:
  0001-alsamixer-fix-display-of-active-inactive-controls.patch
  0002-alsaloop-libsamplerate-requires-specific-formats-for.patch
  0003-alsaloop-another-try-to-force-correct-formats-for-li.patch
  0004-alsamixer-fix-build-on-uClibc.patch
  0005-alsactl-init-Mute-CD-Playback-volume-by-default.patch
  0006-Revert-alsactl-Display-help-for-names-command.patch
  0007-alsaucm-Add-list1-command-for-non-tuple-lists.patch
  0008-alsaucm-Don-t-double-free-empty-lists.patch
  0009-aplay-Add-i-option-for-interactive-mode.patch
  0010-aplay-Avoid-recursive-signal-handling.patch
  0012-alsaloop-Use-AM_CFLAGS-in-Makefile.am.patch
  0013-Updated-COPYING-with-the-recent-FSF-address.patch
  0014-alsamixer-Fix-64bit-issues.patch
  0015-aplay-Add-include-files-for-mkdir.patch
  0016-aplay-Use-standard-endian-convesions.patch

OBS-URL: https://build.opensuse.org/request/show/72632
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=33
2011-06-03 13:33:27 +00:00

35 lines
1.0 KiB
Diff

From a7bd33957e099dea109e219a348b131c7186ee1e Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <jacmet@sunsite.dk>
Date: Mon, 14 Mar 2011 09:48:13 +0100
Subject: [PATCH 04/16] 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>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
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.5.3