Commit 976d9ab1 authored by Roberta Dobrescu's avatar Roberta Dobrescu Committed by Jonathan Cameron

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: default avatarRoberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 817020cf
CC = gcc CC = gcc
CFLAGS = -Wall -g CFLAGS = -Wall -g -D_GNU_SOURCE
all: iio_event_monitor lsiio generic_buffer all: iio_event_monitor lsiio generic_buffer
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* *
*/ */
#define _GNU_SOURCE
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <dirent.h> #include <dirent.h>
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
* *
*/ */
#define _GNU_SOURCE
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdbool.h> #include <stdbool.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment