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>
This commit is contained in:
Peter Korsgaard 2011-03-14 09:48:13 +01:00 committed by Jaroslav Kysela
parent 3801e25964
commit a7bd33957e

View file

@ -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)