public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  perf tools: Add _GNU_SOURCE macro for strndup()
@ 2009-12-02  6:11 Liming Wang
  2009-12-02  8:04 ` Xiao Guangrong
  2009-12-02  8:30 ` [tip:perf/core] perf tools: Fix _GNU_SOURCE macro related strndup() build error tip-bot for Liming Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Liming Wang @ 2009-12-02  6:11 UTC (permalink / raw)
  To: Ingo Molnar, mhiramat, fweisbec; +Cc: peterz, linux-kernel, Liming Wang

strndup is a GNU extension. So add _GNU_SOURCE macro
to avoid compiling error.

Signed-off-by: Liming Wang <liming.wang@windriver.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 tools/perf/util/string.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
index 0977cf4..ea3eb39 100644
--- a/tools/perf/util/string.c
+++ b/tools/perf/util/string.c
@@ -1,5 +1,8 @@
+#define _GNU_SOURCE
 #include <string.h>
 #include <stdlib.h>
+
+#undef _GNU_SOURCE
 #include "string.h"
 #include "util.h"
 
-- 
1.6.0.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-02  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02  6:11 [PATCH] perf tools: Add _GNU_SOURCE macro for strndup() Liming Wang
2009-12-02  8:04 ` Xiao Guangrong
2009-12-02  8:03   ` Wang Liming
2009-12-02  8:30 ` [tip:perf/core] perf tools: Fix _GNU_SOURCE macro related strndup() build error tip-bot for Liming Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox