linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Bartlett <ajb@elrepo.org>
To: linux-kernel@vger.kernel.org
Cc: phil@elrepo.org, toracat@elrepo.org, acme@kernel.org,
	linux-perf-users@vger.kernel.org
Subject: [PATCH] perf build fix linux-4.4.X branch and RHEL7.4
Date: Sun, 12 Nov 2017 00:11:10 +0000	[thread overview]
Message-ID: <5a07919e.z+O+Phd/vA/MPaXS%ajb@elrepo.org> (raw)

[Please Cc me, as I am not subscribed to the list.]

With the update of RHEL7.3 to RHEL7.4 the perf sub-system
of the stable linux-4.4.X branch fails to build.

tools/perf/bench/futex.h:36:10: error: 'SYS_futex' undeclared
tools/perf/tests/mmap-thread-lookup.c:42:20: error: 'SYS_gettid' undeclared

Fix by inserting two conditional hash-defines.

Signed-off-by: Alan Bartlett <ajb@elrepo.org>
Cc: Akemi Yagi <toracat@elrepo.org>
Cc: Philip J Perry <phil@elrepo.org>

diff -Npru a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h
--- a/tools/perf/bench/futex.h	2017-11-02 04:40:50.000000000 -0400
+++ b/tools/perf/bench/futex.h	2017-11-05 19:59:35.063971553 -0500
@@ -12,6 +12,10 @@
 #include <sys/types.h>
 #include <linux/futex.h>
 
+#ifndef SYS_futex
+#define SYS_futex __NR_futex
+#endif
+
 /**
  * futex() - SYS_futex syscall wrapper
  * @uaddr:	address of first futex
diff -Npru a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
--- a/tools/perf/tests/tests.h	2017-11-02 04:40:50.000000000 -0400
+++ b/tools/perf/tests/tests.h	2017-11-05 20:00:59.702007286 -0500
@@ -1,6 +1,10 @@
 #ifndef TESTS_H
 #define TESTS_H
 
+#ifndef SYS_gettid
+#define SYS_gettid __NR_gettid
+#endif
+
 #define TEST_ASSERT_VAL(text, cond)					 \
 do {									 \
 	if (!(cond)) {							 \

                 reply	other threads:[~2017-11-12  0:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5a07919e.z+O+Phd/vA/MPaXS%ajb@elrepo.org \
    --to=ajb@elrepo.org \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=phil@elrepo.org \
    --cc=toracat@elrepo.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).