From 3f1b4c61ea2aa9c567120bbda91c7bc1ca1b0b9e Mon Sep 17 00:00:00 2001 From: Guo Li Date: Sat, 29 Sep 2018 08:07:34 +0000 Subject: [PATCH] bandwidthd: fix undefined references to inline functions gcc-7 with -Os makes inline functions disappeard. It are caused by the new C11 inline semantics. pass option -fgnu89-inline to gcc let it use gnu inline semantics. see https://wiki.debian.org/GCC7#Porting_help bandwidthd.o: In function `RCDF_Load': bandwidthd.c:(.text+0xb33): undefined reference to `FindIp' bandwidthd.o: In function `PacketCallback': bandwidthd.c:(.text+0x11d0): undefined reference to `FindIp' bandwidthd.c:(.text+0x11e2): undefined reference to `Credit' bandwidthd.c:(.text+0x11ea): undefined reference to `FindIp' bandwidthd.c:(.text+0x11fc): undefined reference to `Credit' bandwidthd.c:(.text+0x1218): undefined reference to `FindIp' bandwidthd.c:(.text+0x122a): undefined reference to `Credit' bandwidthd.c:(.text+0x1232): undefined reference to `FindIp' bandwidthd.c:(.text+0x1244): undefined reference to `Credit' collect2: error: ld returned 1 exit status Makefile:20: recipe for target 'bandwidthd' failed make[4]: *** [bandwidthd] Error 1 Signed-off-by: Guo Li --- utils/bandwidthd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/bandwidthd/Makefile b/utils/bandwidthd/Makefile index e48307174..9dd1f64d3 100644 --- a/utils/bandwidthd/Makefile +++ b/utils/bandwidthd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bandwidthd PKG_VERSION:=2.0.1-35 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/NethServer/bandwidthd/tar.gz/$(PKG_VERSION)? @@ -140,7 +140,7 @@ CONFIGURE_ARGS += \ ac_cv_lib_sqlite3_sqlite3_open=no endif -EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -fgnu89-inline EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib define Package/bandwidthd/install