[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torsocks/master] Define LIBC_SYSCALL_ for FreeBSD.



commit 1253f7f1c74a8315df5356d2c98efd3ad2461893
Author: Linus Nordberg <linus@xxxxxxxxxxx>
Date:   Sun Aug 25 10:40:56 2013 +0200

    Define LIBC_SYSCALL_ for FreeBSD.
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
 src/lib/torsocks.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/lib/torsocks.h b/src/lib/torsocks.h
index 65edeba..7c2ff59 100644
--- a/src/lib/torsocks.h
+++ b/src/lib/torsocks.h
@@ -188,6 +188,19 @@ struct hostent **__result, int *__h_errnop
 
 #endif /* __linux__ */
 
+#if defined(__FreeBSD__)
+#include <sys/syscall.h>
+#include <unistd.h>
+
+/* syscall(2) */
+#define LIBC_SYSCALL_NAME syscall
+#define LIBC_SYSCALL_NAME_STR XSTR(LIBC_SYSCALL_NAME)
+#define LIBC_SYSCALL_RET_TYPE int
+#define LIBC_SYSCALL_SIG int __number, ...
+#define LIBC_SYSCALL_ARGS __number
+
+#endif	/* __FreeBSD__ */
+
 /*
  * The following defines are libc function declarations using the macros
  * defined above on a per OS basis.



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits