]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf tools: Fix the build on the alpine:edge distro
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Jul 2018 16:15:03 +0000 (13:15 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Jul 2018 16:15:03 +0000 (13:15 -0300)
The UAPI file byteorder/little_endian.h uses the __always_inline define
without including the header where it is defined, linux/stddef.h, this
ends up working in all the other distros because that file gets included
seemingly by luck from one of the files included from little_endian.h.

But not on Alpine:edge, that fails for all files where perf_event.h is
included but linux/stddef.h isn't include before that.

Adding the missing linux/stddef.h file where it breaks on Alpine:edge to
fix that, in all other distros, that is just a very small header anyway.

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: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-9r1pifftxvuxms8l7ir73p5l@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/pmu.c
tools/perf/arch/x86/util/tsc.c
tools/perf/perf.h
tools/perf/util/header.h
tools/perf/util/namespaces.h

index 63a74c32ddc5d4a00028e7d01b5377d3ef731285..e33ef5bc31c57f08aa40ac682b4ca8931aba7751 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 
+#include <linux/stddef.h>
 #include <linux/perf_event.h>
 
 #include "../../util/intel-pt.h"
index 06bae7023a5103f28b2734075752d871072b2172..950539f9a4f7778d50bdb4110c49a94d764d4596 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdbool.h>
 #include <errno.h>
 
+#include <linux/stddef.h>
 #include <linux/perf_event.h>
 
 #include "../../perf.h"
index a1a97956136f966a8f7240f4838e131232a93da8..d215714f48df5ebb259d8fddf98d2f831dcee513 100644 (file)
@@ -5,6 +5,7 @@
 #include <time.h>
 #include <stdbool.h>
 #include <linux/types.h>
+#include <linux/stddef.h>
 #include <linux/perf_event.h>
 
 extern bool test_attr__enabled;
index 90d4577a92dc60c7f89867e6ff49a0b7577269bf..6d7fe44aadc0da92a88aa76f464cccf8c340ef28 100644 (file)
@@ -2,6 +2,7 @@
 #ifndef __PERF_HEADER_H
 #define __PERF_HEADER_H
 
+#include <linux/stddef.h>
 #include <linux/perf_event.h>
 #include <sys/types.h>
 #include <stdbool.h>
index 760558dcfd1810c432684b7a7cea1f0aacaba677..cae1a9a397222ca4b06a17f5bda0d4aa6774ce5d 100644 (file)
@@ -10,6 +10,7 @@
 #define __PERF_NAMESPACES_H
 
 #include <sys/types.h>
+#include <linux/stddef.h>
 #include <linux/perf_event.h>
 #include <linux/refcount.h>
 #include <linux/types.h>