commit d13977e5a4b5666eaae23deb4ffdfa313da7c078 Author: David Goulet dgoulet@ev0ke.net Date: Tue Oct 18 10:38:28 2016 -0400
execve: only include xattr.h for Linux
Signed-off-by: David Goulet dgoulet@ev0ke.net --- src/lib/execve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/execve.c b/src/lib/execve.c index ec3d12c..3504b9b 100644 --- a/src/lib/execve.c +++ b/src/lib/execve.c @@ -16,7 +16,6 @@ */
#include <sys/types.h> -#include <sys/xattr.h> #include <sys/stat.h>
#include "torsocks.h" @@ -43,6 +42,7 @@ check_cap_suid(const char *filename)
/* Capabilities as such are just on Linux. */ #ifdef __linux__ +#include <sys/xattr.h> static const char *sec_cap = "security.capability"; ssize_t len = getxattr(filename, sec_cap, NULL, 0); if (len > 0) {
tor-commits@lists.torproject.org