Skip to contentSkip to conversation

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

PATCH Applied gaoxingwang 2 participants 2 messages Feb 10, 2023 – Feb 18, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 testsuite/tools/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
testsuite/tools/Makefile +5 -1
index e0162cc..0356dda 100644
@@ -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
Signature · 1 line
2.27.0
#1 lore raw
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 8 lines · 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")
---
 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html