From: Roberta Dobrescu Date: Thu, 26 Feb 2015 08:49:26 +0000 (+0200) Subject: tools: iio: Define _GNU_SOURCE in Makefile X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=976d9ab112bdef7b25827f576b33068704df78ee;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git tools: iio: Define _GNU_SOURCE in Makefile Definition of _GNU_SOURCE is needed to get rid of some warnings, such as: warning: implicit declaration of function `asprintf'. generic_buffer.c and iio_event_monitor.c define _GNU_SOURCE, but it is also needed in lsiio.c and iio_utils.c. For this reason, this patch adds the definition in Makefile and removes it from where it already exists. Signed-off-by: Roberta Dobrescu Signed-off-by: Jonathan Cameron --- diff --git a/tools/iio/Makefile b/tools/iio/Makefile index 83813ad379f9..bf7ae6d6612a 100644 --- a/tools/iio/Makefile +++ b/tools/iio/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -Wall -g +CFLAGS = -Wall -g -D_GNU_SOURCE all: iio_event_monitor lsiio generic_buffer diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c index 01266c2556da..8f8f058eb807 100644 --- a/tools/iio/generic_buffer.c +++ b/tools/iio/generic_buffer.c @@ -18,8 +18,6 @@ * */ -#define _GNU_SOURCE - #include #include #include diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index f19cff19900e..427c271ac0d6 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -16,8 +16,6 @@ * */ -#define _GNU_SOURCE - #include #include #include