From 4c5891d93dc151e2f07fc87ae967f23e6c3d6e0c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 19 Feb 2015 22:49:44 -0800 Subject: [PATCH] valgrind can't find syscall because we didn't put it in . Change-Id: I1e47291d4476bd2816138a8cf58f29d4986d39e3 --- libc/bionic/ndk_cruft.cpp | 1 + libc/include/sys/syscall.h | 15 ++++----------- libc/include/unistd.h | 2 ++ libc/private/bionic_futex.h | 1 + 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp index 28d635518..77412aca6 100644 --- a/libc/bionic/ndk_cruft.cpp +++ b/libc/bionic/ndk_cruft.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include diff --git a/libc/include/sys/syscall.h b/libc/include/sys/syscall.h index 34a29df3f..21eaf336b 100644 --- a/libc/include/sys/syscall.h +++ b/libc/include/sys/syscall.h @@ -25,20 +25,13 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #ifndef _SYS_SYSCALL_H_ #define _SYS_SYSCALL_H_ -#include -#include -#include -#include +#include /* Linux kernel __NR_* names. */ +#include /* glibc-compatible SYS_* aliases. */ -#include /* glibc-compatible SYS_* aliases for our __NR_* names. */ - -__BEGIN_DECLS - -long syscall(long number, ...); - -__END_DECLS +/* The syscall function itself is declared in , not here. */ #endif /* _SYS_SYSCALL_H_ */ diff --git a/libc/include/unistd.h b/libc/include/unistd.h index 0b6700486..a6d791c98 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -208,6 +208,8 @@ int getpagesize(void); long sysconf(int); +long syscall(long number, ...); + extern int daemon(int, int); #if defined(__arm__) || (defined(__mips__) && !defined(__LP64__)) diff --git a/libc/private/bionic_futex.h b/libc/private/bionic_futex.h index bd2bd369c..401577ab8 100644 --- a/libc/private/bionic_futex.h +++ b/libc/private/bionic_futex.h @@ -34,6 +34,7 @@ #include #include #include +#include __BEGIN_DECLS