aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-11-08 10:48:08 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-11-08 10:48:08 +0000
commit18a68202434757ba1eb3fb5ff434f8030811718d (patch)
treeb36c24306392ec5e7d220f0983a6d494be31977b
parent2a19fe9d2f38f699697c8962610bd2d1a4dbd65b (diff)
downloadmaster-187ad058-18a68202434757ba1eb3fb5ff434f8030811718d.tar.gz
master-187ad058-18a68202434757ba1eb3fb5ff434f8030811718d.tar.bz2
master-187ad058-18a68202434757ba1eb3fb5ff434f8030811718d.zip
resolveip: fix endless getopt() loop when compiled for arm (#12290)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34116 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/network/utils/resolveip/Makefile4
-rw-r--r--package/network/utils/resolveip/src/resolveip.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/package/network/utils/resolveip/Makefile b/package/network/utils/resolveip/Makefile
index 4b3e3d4da6..d1e675e428 100644
--- a/package/network/utils/resolveip/Makefile
+++ b/package/network/utils/resolveip/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2011 OpenWrt.org
+# Copyright (C) 2011-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=resolveip
-PKG_RELEASE:=1
+PKG_RELEASE:=2
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/utils/resolveip/src/resolveip.c b/package/network/utils/resolveip/src/resolveip.c
index 310f35ffd5..43c5ae7f12 100644
--- a/package/network/utils/resolveip/src/resolveip.c
+++ b/package/network/utils/resolveip/src/resolveip.c
@@ -35,7 +35,7 @@ static void show_usage(void)
int main(int argc, char **argv)
{
int timeout = 3;
- char opt;
+ int opt;
char ipaddr[INET6_ADDRSTRLEN];
void *addr;
struct addrinfo *res, *rp;
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
while ((opt = getopt(argc, argv, "46t:h")) > -1)
{
- switch (opt)
+ switch ((char)opt)
{
case '4':
hints.ai_family = AF_INET;