mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:25:43 +01:00
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:
parent
3801e25964
commit
a7bd33957e
1 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,11 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "volume_mapping.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
|
#define MAX_LINEAR_DB_SCALE 24
|
||||||
|
|
||||||
static inline bool use_linear_dB_scale(long dBmin, long dBmax)
|
static inline bool use_linear_dB_scale(long dBmin, long dBmax)
|
||||||
|
|
Loading…
Reference in a new issue