Skip to content

Commit

Permalink
perf tools: Fix _GNU_SOURCE macro related strndup() build error
Browse files Browse the repository at this point in the history
strndup is a GNU extension. So dont include string.h without
defining _GNU_SOURCE (it results in a compile error otherwise).

Remove these includes as util.h does it already.

Signed-off-by: Liming Wang <liming.wang@windriver.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: peterz@infradead.org
Cc: mhiramat@redhat.com
LKML-Reference: <1259734306-26323-1-git-send-email-liming.wang@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Liming Wang authored and Ingo Molnar committed Dec 2, 2009
1 parent 7be077f commit c19e33a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tools/perf/util/string.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <string.h>
#include <stdlib.h>
#include "string.h"
#include "util.h"

Expand Down

0 comments on commit c19e33a

Please sign in to comment.