From: Roi Dayan Date: Tue, 22 Jun 2021 05:42:50 +0000 (+0300) Subject: devlink: Fix link errors on some systems X-Git-Tag: v5.13.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f15c217198c4137f8a5cb329955543d30e4ee23;p=thirdparty%2Fiproute2.git devlink: Fix link errors on some systems On some systems we fail to link because of missing math lib. add -lm to devlink. LINK devlink ../lib/libutil.a(utils_math.o): In function `get_rate': utils_math.c:(.text+0xcc): undefined reference to `floor' ../lib/libutil.a(utils_math.o): In function `get_size': utils_math.c:(.text+0x384): undefined reference to `floor' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:16: devlink] Error 1 make: *** [Makefile:64: all] Error 2 Fixes: 6c70aca76ef2 ("devlink: Add port func rate support") Signed-off-by: Roi Dayan Signed-off-by: Stephen Hemminger --- diff --git a/devlink/Makefile b/devlink/Makefile index d540feb3c..d37a4b4d0 100644 --- a/devlink/Makefile +++ b/devlink/Makefile @@ -7,6 +7,7 @@ ifeq ($(HAVE_MNL),y) DEVLINKOBJ = devlink.o mnlg.o TARGETS += devlink +LDLIBS += -lm endif