From: Peter Korsgaard Date: Mon, 14 Mar 2011 08:48:13 +0000 (+0100) Subject: alsamixer: fix build on uClibc X-Git-Tag: v1.0.25~24 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=a7bd33957e099dea109e219a348b131c7186ee1e;p=alsa-utils.git 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 Signed-off-by: Jaroslav Kysela --- 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 #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)