Files
packages/net/ifstat/Makefile
T
Til Kaiser 6a51c41680 ifstat: fix build with GCC 15
ifstat fails to build with GCC 15 due to an incorrect detection of the
signal handler return type.

The configure script shipped with ifstat uses an obsolete K&R-style
declaration:

  void (*signal())();

With GCC 15 this causes the signal() return type check to incorrectly
assume 'int' instead of 'void'. As a result, the generated code defines
signal handlers returning int, which conflicts with struct sigaction
expecting a void (*)(int) handler and leads to a build failure:

  assignment to 'void (*)(int)' from incompatible pointer type
  'int (*)(int)'

Enable autoreconf during the build to regenerate the configure
script, which correctly detects the signal handler type and fixes
the compilation error.

Signed-off-by: Til Kaiser <mail@tk154.de>
2026-06-14 20:33:53 +03:00

53 lines
1.3 KiB
Makefile

#
# Copyright (C) 2016 Nikil Mehta <nikil.mehta@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ifstat
PKG_VERSION:=1.1
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://gael.roualland.free.fr/ifstat/
PKG_HASH:=8599063b7c398f9cfef7a9ec699659b25b1c14d2bc0f535aed05ce32b7d9f507
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/ifstat
SECTION:=net
CATEGORY:=Network
TITLE:=InterFace STATistics Monitoring
URL:=http://gael.roualland.free.fr/ifstat/
DEPENDS:=+IFSTAT_SNMP:libnetsnmp
endef
define Package/ifstat/description
ifstat is a tool to report network interfaces bandwidth just like
vmstat/iostat do for other system counters. It can monitor local
interfaces by polling the kernel counters, or remote hosts
interfaces using SNMP.
endef
define Package/ifstat/config
source "$(SOURCE)/Config.in"
endef
CONFIGURE_ARGS += --with$(if $(CONFIG_IFSTAT_SNMP),,out)-snmp
define Package/ifstat/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ifstat $(1)/usr/bin/
endef
$(eval $(call BuildPackage,ifstat))