[alsa-devel] [PATCH] amixer: define _GNU_SOURCE to get exp10

Milton Vandersloot miltonrobertvandersloot1412 at protonmail.com
Wed Mar 27 17:43:40 CET 2019


Hi

I get a warning about the implicit declaration of exp10 for amixer (not alsamixer). The same issue was reported at beginning of the year for alsamixer [0,1] and solved by adding -D_GNU_SOURCE to the CFLAGS. (In fact both alsamixer and amixer use the same file alsamixer/volume_mapping.c.) I suggest adding the same CFLAG also to the  amixer Makefile.am.

Cheers
Milton

[0] https://patchwork.kernel.org/patch/10765311/
[1] commit 116488e5f2f1b897084bd151381ee254e1cc177d

Patch suggestion:

>From d31f804d171e7548ecf6e96e96edc7a694a51612 Mon Sep 17 00:00:00 2001
From: Milton Vandersloot <miltonvandersloot at fake-box.com>
Date: Wed, 27 Mar 2019 17:36:54 +0100
Subject: [PATCH] amixer: define _GNU_SOURCE to get exp10

Get rid of a warning about implicit declarition of exp10, which is
behind _GNU_SOURCE as a non-standard feature. The same problem was fixed
for alsamixer in commit 116488e5f2f1b897084bd151381ee254e1cc177d.
---
 amixer/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/amixer/Makefile.am b/amixer/Makefile.am
index 0343c8e..b4526ca 100644
--- a/amixer/Makefile.am
+++ b/amixer/Makefile.am
@@ -1,3 +1,4 @@
+AM_CFLAGS = -D_GNU_SOURCE
 AM_CPPFLAGS = -I$(top_srcdir)/include
 LDADD = -lm
 # LDFLAGS = -static



More information about the Alsa-devel mailing list