diff --git a/libcap/.md5sum b/libcap/.md5sum index 47638492a..563ad2765 100644 --- a/libcap/.md5sum +++ b/libcap/.md5sum @@ -1,2 +1,3 @@ +7327a51597db092d7549310b670b5366 libcap-2.16-drop-linux-workarounds.patch 0d1cee9631768d29b43f450832668687 libcap-2.16-makefile.patch 9e075fda242c4070ba76407064c13302 libcap-2.16.tar.gz diff --git a/libcap/Pkgfile b/libcap/Pkgfile index 3fb37b725..cfc171dab 100644 --- a/libcap/Pkgfile +++ b/libcap/Pkgfile @@ -5,14 +5,16 @@ name=libcap version=2.16 -release=1 +release=2 source=(ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/libcap-$version.tar.gz - $name-$version-makefile.patch) + $name-$version-makefile.patch + $name-$version-drop-linux-workarounds.patch) build () { cd libcap-$version patch -p0 -i $SRC/$name-$version-makefile.patch + patch -p0 -i $SRC/$name-$version-drop-linux-workarounds.patch make make \ diff --git a/libcap/libcap-2.16-drop-linux-workarounds.patch b/libcap/libcap-2.16-drop-linux-workarounds.patch new file mode 100644 index 000000000..bbd6db835 --- /dev/null +++ b/libcap/libcap-2.16-drop-linux-workarounds.patch @@ -0,0 +1,43 @@ +dont need these compat hacks anymore + +http://bugs.gentoo.org/265304 + +--- libcap/include/sys/capability.h ++++ libcap/include/sys/capability.h +@@ -22,18 +22,6 @@ + #include + #include + +-/* +- * Make sure we can be included from userland by preventing +- * capability.h from including other kernel headers +- */ +-#define _LINUX_TYPES_H +-#define _LINUX_FS_H +-#define __LINUX_COMPILER_H +-#define __user +- +-typedef unsigned int __u32; +-typedef __u32 __le32; +- + #include + + /* +--- libcap/include/linux/capability.h ++++ libcap/include/linux/capability.h +@@ -40,13 +40,13 @@ + typedef struct __user_cap_header_struct { + __u32 version; + int pid; +-} __user *cap_user_header_t; ++} *cap_user_header_t; + + typedef struct __user_cap_data_struct { + __u32 effective; + __u32 permitted; + __u32 inheritable; +-} __user *cap_user_data_t; ++} *cap_user_data_t; + + + #define XATTR_CAPS_SUFFIX "capability"