Skip to contentSkip to conversation

tools lib traceevent: Define _GNU_SOURCE in Makefile

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Sep 19, 2012

lore
Share & tools
lore
#0 lore raw
Commit-ID:  c055875b7091a301e2b1107ef8914b7d24e12fb0
Gitweb:     http://git.kernel.org/tip/c055875b7091a301e2b1107ef8914b7d24e12fb0
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Wed, 12 Sep 2012 14:29:40 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 14 Sep 2012 15:49:10 -0300

tools lib traceevent: Define _GNU_SOURCE in Makefile

For the reasons stated on:

commit 0a84f00
Author: David Daney <[email protected]>

perf tools: Fix broken build by defining _GNU_SOURCE in Makefile

Cc David Ahern <[email protected]>
Cc David Daney <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 tools/lib/traceevent/Makefile      |    2 +-
 tools/lib/traceevent/event-parse.c |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +1 -1
index 14131cb..04d959f 100644
@@ -129,7 +129,7 @@ CFLAGS ?= -g -Wall
 
 # Append required CFLAGS
 override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ)
-override CFLAGS += $(udis86-flags)
+override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
 
 ifeq ($(VERBOSE),1)
   Q =
tools/lib/traceevent/event-parse.c +0 -1
index 2c54cdd..77ebeb8 100644
@@ -24,7 +24,6 @@
  *  Frederic Weisbecker gave his permission to relicense the code to
  *  the Lesser General Public License.
  */
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>