1 Star 0 Fork 38

zhangyaqi/iproute

forked from src-openEuler/iproute 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
From c0a06885b944e1f14440f601a0b5266233814d54 Mon Sep 17 00:00:00 2001
From: gaoxingwang <gaoxingwang1@huawei.com>
Date: Fri, 10 Feb 2023 16:45:31 +0800
Subject: [PATCH] testsuite: fix testsuite build failure when iproute build
without libcap-devel
iproute allows to build without libcap.The testsuite will fail to
compile when libcap dose not exists.It was required in 6d68d7f85d.
Fixes: 6d68d7f85d ("testsuite: fix build failure")
Signed-off-by: gaoxingwang <gaoxingwang1@huawei.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
testsuite/tools/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile
index e0162ccc..0356ddae 100644
--- a/testsuite/tools/Makefile
+++ b/testsuite/tools/Makefile
@@ -1,9 +1,13 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS=
+LDLIBS=
include ../../config.mk
+ifeq ($(HAVE_CAP),y)
+LDLIBS+= -lcap
+endif
generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.a ../../lib/libutil.a
- $(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -I../../include -I../../include/uapi -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl -lcap
+ $(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -I../../include -I../../include/uapi -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl $(LDLIBS)
clean:
rm -f generate_nlmsg
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jamesblunt/iproute.git
git@gitee.com:jamesblunt/iproute.git
jamesblunt
iproute
iproute
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385