diff options
author | Irina Tirdea <irina.tirdea@gmail.com> | 2012-09-10 18:14:58 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-11 10:38:10 -0400 |
commit | f8fcd776212bcaa1e2359e39a43c1dbd752b8773 (patch) | |
tree | f50a3f90e3a70108f4e846040289712a06e28730 /tools/perf/util/util.h | |
parent | 2814eb05720baa54ffe0950714fd55a5bcc8a565 (diff) |
perf tools: include wrapper for magic.h
perf is currently including magic.h directly from the kernel. If the
glibc magic.h is also included, this leads to warnings that the
constants are redefined. This happens on some systems (e.g. Android).
Redefinition errors on Android:
In file included from util/util.h:79:0,
from util/cache.h:5,
from util/abspath.c:1:
util/../../../include/linux/magic.h:5:0:
error: "AFFS_SUPER_MAGIC" redefined [-Werror]
bionic/libc/include/sys/vfs.h:53:0:
note: this is the location of the previous definition
util/../../../include/linux/magic.h:19:0:
error: "EFS_SUPER_MAGIC" redefined [-Werror]
bionic/libc/include/sys/vfs.h:61:0:
note: this is the location of the previous definition
util/../../../include/linux/magic.h:26:0:
error: "HPFS_SUPER_MAGIC" redefined [-Werror]
bionic/libc/include/sys/vfs.h:67:0:
note: this is the location of the previous definition
Only two constants from magic.h are used by perf (DEBUGFS_MAGIC and
SYSFS_MAGIC). This fix provides a wrapper for magic.h that includes only
these constants instead of including the kernel header file directly.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Irina Tirdea <irina.tirdea@intel.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1347315303-29906-2-git-send-email-irina.tirdea@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r-- | tools/perf/util/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 67a371355c75..70fa70b535b2 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h | |||
@@ -70,7 +70,7 @@ | |||
70 | #include <sys/socket.h> | 70 | #include <sys/socket.h> |
71 | #include <sys/ioctl.h> | 71 | #include <sys/ioctl.h> |
72 | #include <inttypes.h> | 72 | #include <inttypes.h> |
73 | #include "../../../include/linux/magic.h" | 73 | #include <linux/magic.h> |
74 | #include "types.h" | 74 | #include "types.h" |
75 | #include <sys/ttydefaults.h> | 75 | #include <sys/ttydefaults.h> |
76 | 76 | ||