Fixes build errors such as: mipsel-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I/home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/usr/include -I/home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/include -I/home/florian/dev/toolchains/stbgcc-4.8-1.5/usr/include -I/home/florian/dev/toolchains/stbgcc-4.8-1.5/include -Wall -Wextra -Wno-sign-compare -DIPV6 -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -Wno-unused-result -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -MT fping-optparse.o -MD -MP -MF .deps/fping-optparse.Tpo -c -o fping-optparse.o `test -f 'optparse.c' || echo './'`optparse.c optparse.c: In function 'permute': optparse.c:55:5: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = index; i < options->optind - 1; i++) ^ optparse.c:55:5: note: use option -std=c99 or -std=gnu99 to compile your code optparse.c: In function 'optstring_from_long': optparse.c:160:5: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; !longopts_end(longopts, i); i++) { Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
54 lines
1.4 KiB
Makefile
54 lines
1.4 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:=fping
|
|
PKG_VERSION:=4.0
|
|
PKG_RELEASE:=2
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=http://fping.org/dist/
|
|
PKG_HASH:=67eb4152b98ad34f99d2eec4e1098a0bb52caf13c0c89cd147349d08190fe8ce
|
|
|
|
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
|
|
PKG_LICENSE:=BSD-4-Clause
|
|
PKG_LICENSE_FILES:=COPYING
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/fping
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
TITLE:=sends ICMP ECHO_REQUEST packets to network hosts
|
|
URL:=http://fping.org/
|
|
endef
|
|
|
|
|
|
define Package/fping/description
|
|
fping is a ping like program which uses the Internet Control Message Protocol
|
|
(ICMP) echo request to determine if a target host is responding. fping
|
|
differs from ping in that you can specify any number of targets on the command
|
|
line, or specify a file containing the lists of targets to ping. Instead of
|
|
sending to one target until it times out or replies, fping will send out a
|
|
ping packet and move on to the next target in a round-robin fashion.
|
|
endef
|
|
|
|
CONFIGURE_ARGS+= \
|
|
--enable-ipv4 \
|
|
--enable-ipv6
|
|
|
|
TARGET_CFLAGS += -std=gnu99
|
|
|
|
define Package/fping/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fping $(1)/usr/bin/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,fping))
|