1 Star 0 Fork 17

huanglg/libcap

forked from src-openEuler/libcap 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-libcap-Ensure-the-XATTR_NAME_CAPS-is-define.patch 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
From 41997af6891658ab511c014e20f7846945c11742 Mon Sep 17 00:00:00 2001
From: Roy Li <[email protected]>
Date: Mon, 9 Aug 2021 17:32:20 +0800
Subject: [PATCH] [Backport] libcap: Ensure the XATTR_NAME_CAPS is defined when
it is used
VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build
libcap-native in old release, like CentOS release 6.7 (Final), with the blow
error:
cap_file.c: In function ‘cap_get_fd’:
cap_file.c:199: error: ‘XATTR_NAME_CAPS’ undeclared (first use in this function)
cap_file.c:199: error: (Each undeclared identifier is reported only once
Reference: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
Signed-off-by: Roy Li <[email protected]>
Signed-off-by: lichi <[email protected]>
Signed-off-by: luchangkun <[email protected]>
Signed-off-by: huangyaojun <[email protected]>
---
libcap/cap_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcap/cap_file.c b/libcap/cap_file.c
index 4178705..1e6a28e 100644
--- a/libcap/cap_file.c
+++ b/libcap/cap_file.c
@@ -45,7 +45,7 @@ extern int fremovexattr(int, const char *);
#include "libcap.h"
-#ifdef VFS_CAP_U32
+#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS)
#if VFS_CAP_U32 != __CAP_BLKS
# error VFS representation of capabilities is not the same size as kernel
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huanglg2022/libcap.git
[email protected]:huanglg2022/libcap.git
huanglg2022
libcap
libcap
master

搜索帮助