public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [tip:perf/urgent] perf jitdump: Add the right header to get the major()/minor() definitions
@ 2016-08-16 18:14 tip-bot for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2016-08-16 18:14 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, mingo, dsahern, linux-kernel, jolsa, wangnan0, tglx,
	eranian, adrian.hunter, hpa, namhyung

Commit-ID:  49a7f01064a94c4fd6afb6b4f7e3ccc37d0edf99
Gitweb:     http://git.kernel.org/tip/49a7f01064a94c4fd6afb6b4f7e3ccc37d0edf99
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Sat, 13 Aug 2016 01:12:10 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 15 Aug 2016 13:10:28 -0300

perf jitdump: Add the right header to get the major()/minor() definitions

Noticed on Fedora Rawhide:

  $ gcc --version
  gcc (GCC) 6.1.1 20160721 (Red Hat 6.1.1-4)
  $ rpm -q glibc
  glibc-2.24.90-1.fc26.x86_64
  $

    CC       /tmp/build/perf/util/jitdump.o
  util/jitdump.c: In function 'jit_repipe_code_load':
  util/jitdump.c:428:2: error: '__major_from_sys_types' is deprecated:
    In the GNU C Library, `major' is defined by <sys/sysmacros.h>.
    For historical compatibility, it is currently defined by
    <sys/types.h> as well, but we plan to remove this soon.
    To use `major', include <sys/sysmacros.h> directly.
    If you did not intend to use a system-defined macro `major',
    you should #undef it after including <sys/types.h>.
    [-Werror=deprecated-declarations]
    event->mmap2.maj   = major(st.st_dev);
    ^~~~~
  In file included from /usr/include/features.h:397:0,
                   from /usr/include/sys/types.h:25,
                   from util/jitdump.c:1:
  /usr/include/sys/sysmacros.h:87:1: note: declared here
   __SYSMACROS_DEFINE_MAJOR (__SYSMACROS_FST_IMPL_TEMPL)

Fix it following that recomendation.

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: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-3majvd0adhfr25rvx4v5e9te@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/jitdump.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 9f3305f..95f0884 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -1,3 +1,4 @@
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-16 18:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16 18:14 [tip:perf/urgent] perf jitdump: Add the right header to get the major()/minor() definitions tip-bot for Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox