* [PATCH] tracefs-perf: Add missing headers for syscall() and SYS_* defines
@ 2023-06-14 7:27 Khem Raj
2023-07-05 22:22 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2023-06-14 7:27 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Khem Raj
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tracefs-perf: Add missing headers for syscall() and SYS_* defines
2023-06-14 7:27 [PATCH] tracefs-perf: Add missing headers for syscall() and SYS_* defines Khem Raj
@ 2023-07-05 22:22 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2023-07-05 22:22 UTC (permalink / raw)
To: Khem Raj; +Cc: linux-trace-devel
On Wed, 14 Jun 2023 00:27:59 -0700
Khem Raj <raj.khem@gmail.com> 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
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Applied. Thanks Khem!
-- Steve
> ---
> 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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-05 22:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14 7:27 [PATCH] tracefs-perf: Add missing headers for syscall() and SYS_* defines Khem Raj
2023-07-05 22:22 ` Steven Rostedt
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).