[Pkg-privacy-commits] [torsocks] 05/17: syscall: OS X doesn't support sched_getaffinity()

Intrigeri intrigeri at moszumanska.debian.org
Wed Oct 19 20:59:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch bugfix/typo-subsytem
in repository torsocks.

commit 98a77168ab839733d069248524200f84d7b04671
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Sun Oct 16 11:42:31 2016 -0400

    syscall: OS X doesn't support sched_getaffinity()
    
    Thanks to jcalvert for reporting this failure through my Github page.
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/common/compat.h | 2 ++
 src/lib/syscall.c   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/common/compat.h b/src/common/compat.h
index 41ab8a8..d8949e7 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -192,7 +192,9 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine)(void));
 #define TSOCKS_NR_GETPEERNAME SYS_getpeername
 #define TSOCKS_NR_LISTEN    SYS_listen
 #define TSOCKS_NR_RECVMSG   SYS_recvmsg
+#ifdef !defined(__darwin__)
 #define TSOCKS_NR_SCHED_GETAFFINITY SYS_sched_getaffinity
+#endif /* ! __darwin__ */
 
 #endif /* __FreeBSD__, __FreeBSD_kernel__, __darwin__, __NetBSD__ */
 
diff --git a/src/lib/syscall.c b/src/lib/syscall.c
index 9495a64..ff5a4da 100644
--- a/src/lib/syscall.c
+++ b/src/lib/syscall.c
@@ -164,6 +164,7 @@ static LIBC_RECVMSG_RET_TYPE handle_recvmsg(va_list args)
 	return tsocks_recvmsg(sockfd, msg, flags);
 }
 
+#if !defined(__darwin__)
 /*
  * Handle sched_getaffinity(2) syscall.
  * NOTE: ffmpeg is one of the application that needs this one on the
@@ -182,6 +183,7 @@ static LIBC_SYSCALL_RET_TYPE handle_sched_getaffinity(va_list args)
 	return tsocks_libc_syscall(TSOCKS_NR_SCHED_GETAFFINITY, pid, cpusetsize,
 			mask);
 }
+#endif /* ! __darwin__ */
 
 #if defined(__linux__)
 /*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torsocks.git



More information about the Pkg-privacy-commits mailing list