|
From: Mark W. <ma...@kl...> - 2022-12-25 00:33:48
|
Hi Bart, On Sat, Dec 24, 2022 at 11:37:34PM +0000, Bart Van Assche wrote: > https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2bd7f7042125c99326ffa21c52f368f0721040ca > > commit 2bd7f7042125c99326ffa21c52f368f0721040ca > Author: Bart Van Assche <bva...@ac...> > Date: Mon Jun 20 12:46:40 2022 -0700 > > syscall Could you explain this commit a bit more? It seems to have broken the build on at least debian-i386: In file included from scalar.c:4: scalar.c: In function ‘main’: scalar.c:1272:7: error: ‘__NR_sys_kexec_load’ undeclared (first use in this function) 1272 | GO(__NR_sys_kexec_load, "ni"); | ^~~~~~~~~~~~~~~~~~~ scalar.h:21:20: note: in definition of macro ‘GO’ 21 | __NR_xxx, #__NR_xxx, s); | ^~~~~~~~ scalar.c:1272:7: note: each undeclared identifier is reported only once for each function it appears in 1272 | GO(__NR_sys_kexec_load, "ni"); | ^~~~~~~~~~~~~~~~~~~ scalar.h:21:20: note: in definition of macro ‘GO’ 21 | __NR_xxx, #__NR_xxx, s); | ^~~~~~~~ make[5]: *** [Makefile:755: scalar.o] Error 1 Thanks, Mark > Diff: > --- > memcheck/tests/arm64-linux/scalar.h | 8 +------- > memcheck/tests/x86-linux/scalar.h | 7 +------ > 2 files changed, 2 insertions(+), 13 deletions(-) > > diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h > index 9008816d6e..3dbfa79673 100644 > --- a/memcheck/tests/arm64-linux/scalar.h > +++ b/memcheck/tests/arm64-linux/scalar.h > @@ -1,6 +1,3 @@ > -/* This is the arm64 variant of memcheck/tests/x86-linux/scalar.h */ > -#include "../../../include/vki/vki-scnums-arm64-linux.h" > - > #include <assert.h> > #include <errno.h> > #include <fcntl.h> > @@ -11,10 +8,7 @@ > #include <sys/ptrace.h> > #include <sys/types.h> > #include <sys/mman.h> > - > -// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to > -// declare this ourselves. > -extern long int syscall (long int __sysno, ...) __THROW; > +#include <unistd.h> > > // Thorough syscall scalar arg checking. Also serves as thorough checking > // for (very) basic syscall use. Generally not trying to do anything > diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h > index ef28b03550..3dbfa79673 100644 > --- a/memcheck/tests/x86-linux/scalar.h > +++ b/memcheck/tests/x86-linux/scalar.h > @@ -1,5 +1,3 @@ > -#include "../../../include/vki/vki-scnums-x86-linux.h" > - > #include <assert.h> > #include <errno.h> > #include <fcntl.h> > @@ -10,10 +8,7 @@ > #include <sys/ptrace.h> > #include <sys/types.h> > #include <sys/mman.h> > - > -// Since we use vki_unistd.h, we can't include <unistd.h>. So we have to > -// declare this ourselves. > -extern long int syscall (long int __sysno, ...) __THROW; > +#include <unistd.h> > > // Thorough syscall scalar arg checking. Also serves as thorough checking > // for (very) basic syscall use. Generally not trying to do anything > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |