perf tools: Move HAS_BOOL define to where perl headers are used
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Apr 2017 18:27:52 +0000 (15:27 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Apr 2017 18:27:52 +0000 (15:27 -0300)
This is a perl specific hack, so move it from util.h to where perl
headers are used.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-4igctbinuom2sr6g4b03jqht@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/scripting-engines/trace-event-perl.c
tools/perf/util/util.h

index 2b12bdb3ce33d0fbc9b8d5387fc5323153511b6e..7b79c413486b3a6ef8b0f6c32e330911c5ce7638 100644 (file)
@@ -28,7 +28,9 @@
 #include <linux/bitmap.h>
 #include <linux/time64.h>
 
-#include "../util.h"
+#include <stdbool.h>
+/* perl needs the following define, right after including stdbool.h */
+#define HAS_BOOL
 #include <EXTERN.h>
 #include <perl.h>
 
index 6855c454e5bcb27af4411c353eef2db43686d2d8..622c2d251ad363bc243efdcb881fc4c9a3a4e875 100644 (file)
@@ -5,7 +5,6 @@
 #define _BSD_SOURCE 1
 /* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */
 #define _DEFAULT_SOURCE 1
-#define HAS_BOOL
 
 #include <fcntl.h>
 #include <stdbool.h>