summaryrefslogtreecommitdiff
path: root/tools/perf/trace
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2024-03-15 22:18:14 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2024-03-21 16:41:27 +0300
commita672af9139a843eb7a48fd7846bb6df8f81b5f86 (patch)
tree221c06a1e6895c4b7888aa12275879a3316b824c /tools/perf/trace
parent8a1ad4413519b10fbe5e73300b198498a0b28806 (diff)
downloadlinux-a672af9139a843eb7a48fd7846bb6df8f81b5f86.tar.xz
tools headers: Remove almost unused copy of uapi/stat.h, add few conditional defines
These were used to build perf to provide defines not available in older distros, but this was back in 2017, nowadays most the distros that are supported and I have build containers for work using just the system headers, so ditch them. For the few that don't have STATX_MNT_ID{_UNIQUE}, or STATX_MNT_DIOALIGN add them conditionally. Some of these older distros may not have things that are used in 'perf trace', but then they also don't have libtraceevent packages, so don't build 'perf trace'. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/20240315204835.748716-6-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/trace')
-rw-r--r--tools/perf/trace/beauty/statx.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/perf/trace/beauty/statx.c b/tools/perf/trace/beauty/statx.c
index d1ccc93316bd..1f7e34ed4e02 100644
--- a/tools/perf/trace/beauty/statx.c
+++ b/tools/perf/trace/beauty/statx.c
@@ -9,7 +9,17 @@
#include <linux/kernel.h>
#include <sys/types.h>
#include <linux/fcntl.h>
-#include <uapi/linux/stat.h>
+#include <linux/stat.h>
+
+#ifndef STATX_MNT_ID
+#define STATX_MNT_ID 0x00001000U
+#endif
+#ifndef STATX_DIOALIGN
+#define STATX_DIOALIGN 0x00002000U
+#endif
+#ifndef STATX_MNT_ID_UNIQUE
+#define STATX_MNT_ID_UNIQUE 0x00004000U
+#endif
size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_arg *arg)
{