[tor-commits] [torsocks/master] Make cpp conditional for definition of handle_mmap match use

dgoulet at torproject.org dgoulet at torproject.org
Fri Feb 24 17:42:06 UTC 2017


commit 6520a009e1ba3c5f0c3a4e875aa4c8b396a3f2bc
Author: Taylor R Campbell <campbell+torsocks at mumble.net>
Date:   Fri Feb 24 12:41:53 2017 -0500

    Make cpp conditional for definition of handle_mmap match use
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/lib/syscall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/syscall.c b/src/lib/syscall.c
index d0fdaaa..41cba28 100644
--- a/src/lib/syscall.c
+++ b/src/lib/syscall.c
@@ -84,7 +84,7 @@ static LIBC_ACCEPT_RET_TYPE handle_accept(va_list args)
 	return tsocks_accept(sockfd, addr, &addrlen);
 }
 
-#if (defined(__linux__) || defined(__darwin__) || (defined(__FreeBSD_kernel__) && defined(__i386__)) || defined(__NetBSD__))
+#if !((defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && defined(__x86_64))
 /*
  * Handle mmap(2) syscall.
  */
@@ -104,7 +104,7 @@ static LIBC_SYSCALL_RET_TYPE handle_mmap(va_list args)
 
 	return (LIBC_SYSCALL_RET_TYPE) mmap(addr, len, prot, flags, fd, offset);
 }
-#endif /* __linux__, __darwin__, __FreeBSD_kernel__, __i386__, __NetBSD__ */
+#endif /* __NetBSD__, __FreeBSD__, __FreeBSD_kernel__, __x86_64 */
 
 /*
  * Handle munmap(2) syscall.



More information about the tor-commits mailing list