Message ID | 20230614072759.316154-1-raj.khem@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d1989ae054fec86f87f3458cc84b139503e6b7a4 |
Headers | show |
Series | tracefs-perf: Add missing headers for syscall() and SYS_* defines | expand |
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>
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>
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(-)