aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch
blob: a24dd1315bc0d972d6808b41c87aacf559e45c7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From f539d96ef4a34ad23d33c552d1770ab429b0220e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 14 Jun 2023 00:24:36 -0700
Subject: [PATCH] tracefs-perf: Add missing headers for syscall() and SYS_*
 defines

These headers are needed to provide prototype definitions for functions
e.g. close(), syscall(), getpagesize(), getpid()

The issue is observed with clang-16+ compiler on musl systems

Upstream-Status: Submitted [https://lore.kernel.org/linux-trace-devel/20230614072759.316154-1-raj.khem@gmail.com/T/#u]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/tracefs-perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tracefs-perf.c b/src/tracefs-perf.c
index 96d12cd..62c1508 100644
--- a/src/tracefs-perf.c
+++ b/src/tracefs-perf.c
@@ -1,4 +1,5 @@
-#include <asm/unistd.h>
+#include <unistd.h>
+#include <sys/syscall.h>
 #include <sys/mman.h>
 #include <signal.h>
 #include <linux/perf_event.h>
-- 
2.41.0