Message ID | 20230210084531.98534-1-gaoxingwang1@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c0a06885b944e1f14440f601a0b5266233814d54 |
Delegated to: | Stephen Hemminger |
Headers | show |
Series | testsuite: fix testsuite build failure when iproute build without libcap-devel | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hello: This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <stephen@networkplumber.org>: On Fri, 10 Feb 2023 16:45:31 +0800 you wrote: > 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> > --- > testsuite/tools/Makefile | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Here is the summary with links: - testsuite: fix testsuite build failure when iproute build without libcap-devel https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=c0a06885b944 You are awesome, thank you!
diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile index e0162cc..0356dda 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
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> --- testsuite/tools/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)