From: Roberta Dobrescu <roberta.dobrescu@gmail.com>
To: linux-iio@vger.kernel.org
Cc: daniel.baluta@intel.com, octavian.purdila@intel.com,
jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, Roberta Dobrescu <roberta.dobrescu@gmail.com>
Subject: [PATCH 4/5] tools: iio: Define _GNU_SOURCE in Makefile
Date: Thu, 26 Feb 2015 10:49:26 +0200 [thread overview]
Message-ID: <1424940567-24877-5-git-send-email-roberta.dobrescu@gmail.com> (raw)
In-Reply-To: <1424940567-24877-1-git-send-email-roberta.dobrescu@gmail.com>
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>
---
tools/iio/Makefile | 2 +-
tools/iio/generic_buffer.c | 2 --
tools/iio/iio_event_monitor.c | 2 --
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/tools/iio/Makefile b/tools/iio/Makefile
index 83813ad..bf7ae6d 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 01266c2..8f8f058 100644
--- a/tools/iio/generic_buffer.c
+++ b/tools/iio/generic_buffer.c
@@ -18,8 +18,6 @@
*
*/
-#define _GNU_SOURCE
-
#include <unistd.h>
#include <stdlib.h>
#include <dirent.h>
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index f19cff1..427c271 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -16,8 +16,6 @@
*
*/
-#define _GNU_SOURCE
-
#include <unistd.h>
#include <stdlib.h>
#include <stdbool.h>
--
1.9.1
next prev parent reply other threads:[~2015-02-26 8:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 8:49 [PATCH 0/5] iio: Move iio userspace applications out of staging Roberta Dobrescu
2015-02-26 8:49 ` [PATCH 1/5] staging: iio: Documentation: iio_event_monitor: Include linux/iio/types.h Roberta Dobrescu
2015-03-09 17:12 ` Jonathan Cameron
2015-02-26 8:49 ` [PATCH 2/5] staging: iio: Documentation: Introduce iio_utils.c Roberta Dobrescu
2015-03-09 17:14 ` Jonathan Cameron
2015-02-26 8:49 ` [PATCH 3/5] iio: Move iio userspace applications out of staging Roberta Dobrescu
2015-03-09 17:16 ` Jonathan Cameron
2015-05-02 23:21 ` Hartmut Knaack
2015-05-12 19:44 ` Jonathan Cameron
2015-02-26 8:49 ` Roberta Dobrescu [this message]
2015-03-09 17:18 ` [PATCH 4/5] tools: iio: Define _GNU_SOURCE in Makefile Jonathan Cameron
2015-02-26 8:49 ` [PATCH 5/5] tools: iio: lsiio: Remove unused variables Roberta Dobrescu
2015-03-09 17:23 ` Jonathan Cameron
2015-03-10 16:03 ` Roberta Dobrescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424940567-24877-5-git-send-email-roberta.dobrescu@gmail.com \
--to=roberta.dobrescu@gmail.com \
--cc=daniel.baluta@intel.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).