Skip to contentSkip to conversation

tracefs-perf: Add missing headers for syscall() and SYS_* defines

PATCH Applied Khem Raj 2 participants 2 messages Jun 14, 2023 – Jul 5, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 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

---
 src/tracefs-perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/tracefs-perf.c +2 -1
index 96d12cd..62c1508 100644
@@ -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>
Signature · 1 line
2.41.0
#1 lore raw
Quoted 6 lines · On Wed, 14 Jun 2023 00:27:59 -0700 Khem Raj <[email protected]> wrote:

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

Applied. Thanks Khem!

-- Steve

Quoted 15 lines
---
 src/tracefs-perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/tracefs-perf.c +2 -1
index 96d12cd..62c1508 100644
@@ -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>