[Pkg-privacy-commits] [torsocks] 12/17: syscall: sched_getaffinity is only Linux

Intrigeri intrigeri at moszumanska.debian.org
Wed Oct 19 20:59:17 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 b0174499cf17cf153d76b26dadf6b57e18d4a801
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Tue Oct 18 10:32:43 2016 -0400

    syscall: sched_getaffinity is only Linux
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/common/compat.h | 3 ---
 src/lib/syscall.c   | 5 ++---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/common/compat.h b/src/common/compat.h
index 0eb4fda..aa1da28 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -194,9 +194,6 @@ 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
-#if !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 ff5a4da..789c380 100644
--- a/src/lib/syscall.c
+++ b/src/lib/syscall.c
@@ -164,7 +164,8 @@ static LIBC_RECVMSG_RET_TYPE handle_recvmsg(va_list args)
 	return tsocks_recvmsg(sockfd, msg, flags);
 }
 
-#if !defined(__darwin__)
+#if defined(__linux__)
+
 /*
  * Handle sched_getaffinity(2) syscall.
  * NOTE: ffmpeg is one of the application that needs this one on the
@@ -183,9 +184,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__)
 /*
  * Handle gettid(2) syscall.
  */

-- 
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