lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <bda34400c9bdddd48e15526f9a8e203b1a849e45.1761689740.git.aclaudi@redhat.com>
Date: Tue, 28 Oct 2025 23:17:56 +0100
From: Andrea Claudi <aclaudi@...hat.com>
To: netdev@...r.kernel.org
Cc: Erni Sri Satya Vennela <ernis@...ux.microsoft.com>,
	Stephen Hemminger <stephen@...workplumber.org>,
	David Ahern <dsahern@...nel.org>
Subject: [PATCH iproute2] netshaper: fix build failure

netshaper fails to build from sources with this error:

$ make
netshaper
    CC       netshaper.o
    LINK     netshaper
/usr/bin/ld: ../lib/libutil.a(utils_math.o): in function `get_rate':
utils_math.c:(.text+0x97): undefined reference to `floor'
/usr/bin/ld: ../lib/libutil.a(utils_math.o): in function `get_size64':
utils_math.c:(.text+0x2a8): undefined reference to `floor'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:10: netshaper] Error 1
make: *** [Makefile:81: all] Error 2

Fix this simply linking against the math C library, similarly to what we
already did with commit 1a22ad2721fb ("build: Fix link errors on some
systems").

Fixes: 6f7779ad4ef6 ("netshaper: Add netshaper command")
Signed-off-by: Andrea Claudi <aclaudi@...hat.com>
---
 netshaper/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/netshaper/Makefile b/netshaper/Makefile
index 3b293604..54a6a691 100644
--- a/netshaper/Makefile
+++ b/netshaper/Makefile
@@ -3,6 +3,7 @@ include ../config.mk
 
 NSOBJ = netshaper.o
 TARGETS += netshaper
+LDLIBS += -lm
 
 all: $(TARGETS) $(LIBS)
 
-- 
2.51.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ