|
From: Bart V. A. <bva...@so...> - 2022-12-25 00:51:14
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=1845f517283562f11ce05757bb62d988cbf273bd commit 1845f517283562f11ce05757bb62d988cbf273bd Author: Bart Van Assche <bva...@ac...> Date: Sat Dec 24 16:49:56 2022 -0800 Revert "syscall" Revert an incomplete commit that got published accidentally. Diff: --- memcheck/tests/arm64-linux/scalar.h | 8 +++++++- memcheck/tests/x86-linux/scalar.h | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h index 3dbfa79673..9008816d6e 100644 --- a/memcheck/tests/arm64-linux/scalar.h +++ b/memcheck/tests/arm64-linux/scalar.h @@ -1,3 +1,6 @@ +/* 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> @@ -8,7 +11,10 @@ #include <sys/ptrace.h> #include <sys/types.h> #include <sys/mman.h> -#include <unistd.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; // 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 3dbfa79673..ef28b03550 100644 --- a/memcheck/tests/x86-linux/scalar.h +++ b/memcheck/tests/x86-linux/scalar.h @@ -1,3 +1,5 @@ +#include "../../../include/vki/vki-scnums-x86-linux.h" + #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -8,7 +10,10 @@ #include <sys/ptrace.h> #include <sys/types.h> #include <sys/mman.h> -#include <unistd.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; // Thorough syscall scalar arg checking. Also serves as thorough checking // for (very) basic syscall use. Generally not trying to do anything |