From fae93e9b6d46b998902e2c3ce58704235aa915d7 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 11 Jun 2016 20:45:07 +0000 Subject: [PATCH] fix compilation and getdents. --- .../dist/libsanitizer/sanitizer_common/sanitizer_linux.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc index 28644909da11..606a2975128f 100644 --- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc +++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc @@ -538,7 +538,7 @@ uptr internal_ptrace(int request, int pid, void *addr, void *data) { } uptr internal_waitpid(int pid, int *status, int options) { -+#if SANITIZER_NETBSD +#if SANITIZER_NETBSD return internal_syscall(SYSCALL(wait4), pid, status, options, NULL /* rusage */); #else @@ -556,7 +556,9 @@ uptr internal_getppid() { } uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count) { -#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS +#if SANITIZER_NETBSD + return internal_syscall(SYSCALL(getdents), fd, dirp, (uptr)count); +#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS return internal_syscall(SYSCALL(getdents64), fd, (uptr)dirp, count); #else return internal_syscall(SYSCALL(getdents), fd, (uptr)dirp, count);