tracefs-perf: Add missing headers for syscall() and SYS_* defines
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
Signed-off-by Khem Raj <[email protected]>
--- src/tracefs-perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/tracefs-perf.c +2 -1
@@ -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
Steven Rostedt
AppliedQuoted 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
Signed-off-by Khem Raj <[email protected]>
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@@ -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>