diff mbox series

testsuite: fix testsuite build failure when iproute build without libcap-devel

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

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

gaoxingwang Feb. 10, 2023, 8:45 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 18, 2023, 1:50 a.m. UTC | #1
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 mbox series

Patch

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