From: Khem Raj <raj.khem@gmail.com>
To: linux-trace-devel@vger.kernel.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] tracefs-perf: Add missing headers for syscall() and SYS_* defines
Date: Wed, 14 Jun 2023 00:27:59 -0700 [thread overview]
Message-ID: <20230614072759.316154-1-raj.khem@gmail.com> (raw)
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
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
next reply other threads:[~2023-06-14 7:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 7:27 Khem Raj [this message]
2023-07-05 22:22 ` [PATCH] tracefs-perf: Add missing headers for syscall() and SYS_* defines Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230614072759.316154-1-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).