diff options
| author | Roy Li <rongqing.li@windriver.com> | 2016-06-23 16:26:43 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-01 16:22:42 +0100 |
| commit | 3b208bc24b17a196a5b891e331d0a9a66e9ef02c (patch) | |
| tree | b07db9996cadc17ddcf70a50bf6cd25c6d8b7e31 | |
| parent | 0658935795966c63c50673b7c3b879c151d6551e (diff) | |
| download | poky-3b208bc24b17a196a5b891e331d0a9a66e9ef02c.tar.gz | |
libcap: fix the libcap-native building failure on CentOS 6.7
(From OE-Core rev: a80656588a5122b0930a0d8a574c6633118f78d4)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch | 32 | ||||
| -rw-r--r-- | meta/recipes-support/libcap/libcap_2.25.bb | 5 |
2 files changed, 35 insertions, 2 deletions
diff --git a/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch b/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch new file mode 100644 index 0000000000..a43017c674 --- /dev/null +++ b/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | ensure the XATTR_NAME_CAPS is defined when it is used | ||
| 2 | |||
| 3 | Upstream-status: Pending | ||
| 4 | |||
| 5 | VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build | ||
| 6 | libcap-native in old release, like CentOS release 6.7 (Final), with the blow | ||
| 7 | error: | ||
| 8 | cap_file.c: In function ‘cap_get_fd’: | ||
| 9 | cap_file.c:199: error: ‘XATTR_NAME_CAPS’ undeclared (first use in this function) | ||
| 10 | cap_file.c:199: error: (Each undeclared identifier is reported only once | ||
| 11 | |||
| 12 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
| 13 | --- | ||
| 14 | libcap/cap_file.c | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/libcap/cap_file.c b/libcap/cap_file.c | ||
| 18 | index 40756ea..e27ca80 100644 | ||
| 19 | --- a/libcap/cap_file.c | ||
| 20 | +++ b/libcap/cap_file.c | ||
| 21 | @@ -25,7 +25,7 @@ extern int fremovexattr(int, const char *); | ||
| 22 | |||
| 23 | #include "libcap.h" | ||
| 24 | |||
| 25 | -#ifdef VFS_CAP_U32 | ||
| 26 | +#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS) | ||
| 27 | |||
| 28 | #if VFS_CAP_U32 != __CAP_BLKS | ||
| 29 | # error VFS representation of capabilities is not the same size as kernel | ||
| 30 | -- | ||
| 31 | 2.8.1 | ||
| 32 | |||
diff --git a/meta/recipes-support/libcap/libcap_2.25.bb b/meta/recipes-support/libcap/libcap_2.25.bb index 865ebb8d2c..8f3f11e5e6 100644 --- a/meta/recipes-support/libcap/libcap_2.25.bb +++ b/meta/recipes-support/libcap/libcap_2.25.bb | |||
| @@ -7,8 +7,9 @@ LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1" | |||
| 7 | 7 | ||
| 8 | DEPENDS = "hostperl-runtime-native" | 8 | DEPENDS = "hostperl-runtime-native" |
| 9 | 9 | ||
| 10 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz" | 10 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ |
| 11 | 11 | file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ | |
| 12 | " | ||
| 12 | SRC_URI[md5sum] = "6666b839e5d46c2ad33fc8aa2ceb5f77" | 13 | SRC_URI[md5sum] = "6666b839e5d46c2ad33fc8aa2ceb5f77" |
| 13 | SRC_URI[sha256sum] = "693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162" | 14 | SRC_URI[sha256sum] = "693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162" |
| 14 | 15 | ||
