All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: hpa@zytor.com, acme@redhat.com, paulus@samba.org,
	eranian@google.com, linux-kernel@vger.kernel.org, efault@gmx.de,
	peterz@infradead.org, fweisbec@gmail.com, dsahern@gmail.com,
	adrian.hunter@intel.com, tglx@linutronix.de,
	Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: linux-tip-commits@vger.kernel.org
Subject: perf/compat: Fill in new definitions for madvise()/mmap() flags
Date: Thu, 12 Sep 2013 15:29:00 +0200	[thread overview]
Message-ID: <20130912132900.GE23826@gmail.com> (raw)
In-Reply-To: <tip-w28d1o3uslden0k57653kda7@git.kernel.org>

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,

  parent reply	other threads:[~2013-09-12 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 10:09 [tip:perf/core] perf trace: Simplify sys_exit return printing tip-bot for Arnaldo Carvalho de Melo
2013-09-12 13:27 ` perf/compat: Sharpen the libaudit dependencies test Ingo Molnar
2013-09-13 19:20   ` Arnaldo Carvalho de Melo
2013-09-14  5:49     ` Ingo Molnar
2013-09-20  9:55   ` [tip:perf/urgent] perf tools: " tip-bot for Ingo Molnar
2013-09-12 13:29 ` Ingo Molnar [this message]
2013-09-20  9:55   ` [tip:perf/urgent] perf tools: Fill in new definitions for madvise ()/mmap() flags tip-bot for Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130912132900.GE23826@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.