aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-06-14 00:30:20 -0700
committerKhem Raj <raj.khem@gmail.com>2023-06-14 09:50:28 -0700
commit9c2602353bb86e715d463eb42951c2b64ebf9585 (patch)
tree4a94f0fd55d037d0d316586eb52f3201478a24ee /meta-oe/recipes-kernel
parenteb6de6cd4bd5bbbee34b5d4cd1bf4c18fafbe258 (diff)
downloadmeta-openembedded-9c2602353bb86e715d463eb42951c2b64ebf9585.tar.gz
libtracefs: Fix build with clang+musl
Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Wang Mingyu <wangmy@fujitsu.com>
Diffstat (limited to 'meta-oe/recipes-kernel')
-rw-r--r--meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch31
-rw-r--r--meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch b/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch
new file mode 100644
index 0000000000..a24dd1315b
--- /dev/null
+++ b/meta-oe/recipes-kernel/libtracefs/libtracefs/0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch
@@ -0,0 +1,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
+
diff --git a/meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb b/meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb
index 77556d9126..9a408ba13c 100644
--- a/meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb
+++ b/meta-oe/recipes-kernel/libtracefs/libtracefs_1.7.0.bb
@@ -12,6 +12,7 @@ DEPENDS = "libtraceevent bison-native flex-native"
SRCREV = "aebab37379d0fbadc702d64aca0fe5cf18676404"
SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git;branch=${BPN};protocol=https \
file://0001-makefile-Do-not-preserve-ownership-in-cp-command.patch \
+ file://0001-tracefs-perf-Add-missing-headers-for-syscall-and-SYS.patch \
"
S = "${WORKDIR}/git"