diff options
author | Roberta Dobrescu <roberta.dobrescu@gmail.com> | 2015-02-26 03:49:26 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-03-09 13:17:26 -0400 |
commit | 976d9ab112bdef7b25827f576b33068704df78ee (patch) | |
tree | b8f74336d268657db772310d6a6dc433c935db2f /tools/iio | |
parent | 817020cfb3a2649064a1e14e083934234e2c208d (diff) |
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 <roberta.dobrescu@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio')
-rw-r--r-- | tools/iio/Makefile | 2 | ||||
-rw-r--r-- | tools/iio/generic_buffer.c | 2 | ||||
-rw-r--r-- | tools/iio/iio_event_monitor.c | 2 |
3 files changed, 1 insertions, 5 deletions
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 @@ | |||
1 | CC = gcc | 1 | CC = gcc |
2 | CFLAGS = -Wall -g | 2 | CFLAGS = -Wall -g -D_GNU_SOURCE |
3 | 3 | ||
4 | all: iio_event_monitor lsiio generic_buffer | 4 | all: iio_event_monitor lsiio generic_buffer |
5 | 5 | ||
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 @@ | |||
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define _GNU_SOURCE | ||
22 | |||
23 | #include <unistd.h> | 21 | #include <unistd.h> |
24 | #include <stdlib.h> | 22 | #include <stdlib.h> |
25 | #include <dirent.h> | 23 | #include <dirent.h> |
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 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define _GNU_SOURCE | ||
20 | |||
21 | #include <unistd.h> | 19 | #include <unistd.h> |
22 | #include <stdlib.h> | 20 | #include <stdlib.h> |
23 | #include <stdbool.h> | 21 | #include <stdbool.h> |