summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-01-14 08:33:45 +0000
committerRoy Marples <uberlord@gentoo.org>2007-01-14 08:33:45 +0000
commitc76e6f0cbc87e600ebc357cdb76a21056fd2f68c (patch)
treee7ff03daed00aa0086f38357b58134ea0eadf830 /net-ftp/vsftpd/files
parentVersion bump, bug 161887 (diff)
downloadgentoo-2-c76e6f0cbc87e600ebc357cdb76a21056fd2f68c.tar.gz
gentoo-2-c76e6f0cbc87e600ebc357cdb76a21056fd2f68c.tar.bz2
gentoo-2-c76e6f0cbc87e600ebc357cdb76a21056fd2f68c.zip
Fix building without the caps USE flag, #159488.
(Portage version: 2.1.2_rc4-r8)
Diffstat (limited to 'net-ftp/vsftpd/files')
-rw-r--r--net-ftp/vsftpd/files/vsftpd-2.0.5-caps.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/net-ftp/vsftpd/files/vsftpd-2.0.5-caps.patch b/net-ftp/vsftpd/files/vsftpd-2.0.5-caps.patch
new file mode 100644
index 000000000000..7eb76cc338d7
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-2.0.5-caps.patch
@@ -0,0 +1,35 @@
+diff -ur vsftpd-2.0.5.orig/sysdeputil.c vsftpd-2.0.5/sysdeputil.c
+--- vsftpd-2.0.5.orig/sysdeputil.c 2007-01-05 17:58:28.000000000 +0000
++++ vsftpd-2.0.5/sysdeputil.c 2007-01-05 17:55:30.000000000 +0000
+@@ -154,11 +154,8 @@
+ #include <sys/capability.h>
+
+ #if defined(VSF_SYSDEP_HAVE_CAPABILITIES) && !defined(VSF_SYSDEP_HAVE_LIBCAP)
+-#include <linux/unistd.h>
+ #include <linux/capability.h>
+-#include <errno.h>
+-#include <syscall.h>
+-_syscall2(int, capset, cap_user_header_t, header, const cap_user_data_t, data)
++#include <sys/syscall.h>
+ /* Gross HACK to avoid warnings - linux headers overlap glibc headers */
+ #undef __NFDBITS
+ #undef __FDMASK
+@@ -508,6 +505,18 @@
+ }
+
+ #ifndef VSF_SYSDEP_HAVE_LIBCAP
++
++static int
++capset(struct __user_cap_header_struct *header,
++ const struct __user_cap_data_struct *data);
++
++static int
++capset(struct __user_cap_header_struct *header,
++ const struct __user_cap_data_struct *data)
++{
++ return syscall(__NR_capset, header, data);
++}
++
+ static int
+ do_checkcap(void)
+ {