diff options
author | Elliott Hughes <enh@google.com> | 2015-02-19 22:49:44 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-02-19 22:49:44 -0800 |
commit | 4c5891d93dc151e2f07fc87ae967f23e6c3d6e0c (patch) | |
tree | 0a18a145999730a8bcb118c2b42b4e6a8ffa15d9 | |
parent | 97484d3a9d0d822aeaaa1547aeb76d7669076082 (diff) | |
download | android_bionic-4c5891d93dc151e2f07fc87ae967f23e6c3d6e0c.tar.gz android_bionic-4c5891d93dc151e2f07fc87ae967f23e6c3d6e0c.tar.bz2 android_bionic-4c5891d93dc151e2f07fc87ae967f23e6c3d6e0c.zip |
valgrind can't find syscall because we didn't put it in <unistd.h>.
Change-Id: I1e47291d4476bd2816138a8cf58f29d4986d39e3
-rw-r--r-- | libc/bionic/ndk_cruft.cpp | 1 | ||||
-rw-r--r-- | libc/include/sys/syscall.h | 15 | ||||
-rw-r--r-- | libc/include/unistd.h | 2 | ||||
-rw-r--r-- | 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 <ctype.h> #include <dirent.h> +#include <errno.h> #include <inttypes.h> #include <pthread.h> #include <signal.h> 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 <errno.h> -#include <sys/cdefs.h> -#include <sys/types.h> -#include <asm/unistd.h> - -#include <sys/glibc-syscalls.h> /* glibc-compatible SYS_* aliases for our __NR_* names. */ - -__BEGIN_DECLS - -long syscall(long number, ...); +#include <asm/unistd.h> /* Linux kernel __NR_* names. */ +#include <sys/glibc-syscalls.h> /* glibc-compatible SYS_* aliases. */ -__END_DECLS +/* The syscall function itself is declared in <unistd.h>, 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 <stddef.h> #include <sys/cdefs.h> #include <sys/syscall.h> +#include <unistd.h> __BEGIN_DECLS |