lkml.org 
[lkml]   [2013]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectperf/compat: Fill in new definitions for madvise()/mmap() flags
builtin-trace.c started using various new syscall features not defined in 
the header files of older distros - resulting in build failures.

Fill in the (ABI) constants if they are not defined.

(There might be a better place to put this than builtin-trace.c, into a
compat header or so.)

Signed-off-by: Ingo Molnar <mingo@kernel.org>

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index f5aa637..e640e28 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -16,6 +16,23 @@
#include <sys/mman.h>
#include <linux/futex.h>

+/* For older distros: */
+#ifndef MAP_STACK
+# define MAP_STACK 0x20000
+#endif
+
+#ifndef MADV_HWPOISON
+# define MADV_HWPOISON 100
+#endif
+
+#ifndef MADV_MERGEABLE
+# define MADV_MERGEABLE 12
+#endif
+
+#ifndef MADV_UNMERGEABLE
+# define MADV_UNMERGEABLE 13
+#endif
+
static size_t syscall_arg__scnprintf_hex(char *bf, size_t size,
unsigned long arg,
u8 arg_idx __maybe_unused,

\
 
 \ /
  Last update: 2013-09-12 16:01    [W:0.524 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site