diff options
author | Elliott Hughes <enh@google.com> | 2015-02-20 16:56:57 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-02-20 16:56:58 +0000 |
commit | c39eef71a7f66b69e2216a51d0e7fbc1796d0696 (patch) | |
tree | 10867fe44c48e7bb0135430636f5a7cf708f5c20 | |
parent | 324313a9e58c0e8d2546d124d8fcf04306a114f5 (diff) | |
parent | 4c5891d93dc151e2f07fc87ae967f23e6c3d6e0c (diff) | |
download | android_bionic-c39eef71a7f66b69e2216a51d0e7fbc1796d0696.tar.gz android_bionic-c39eef71a7f66b69e2216a51d0e7fbc1796d0696.tar.bz2 android_bionic-c39eef71a7f66b69e2216a51d0e7fbc1796d0696.zip |
Merge "valgrind can't find syscall because we didn't put it in <unistd.h>."
-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 |