-# 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.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=resolveip
include $(TOPDIR)/rules.mk
PKG_NAME:=resolveip
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/package.mk
int main(int argc, char **argv)
{
int timeout = 3;
int main(int argc, char **argv)
{
int timeout = 3;
char ipaddr[INET6_ADDRSTRLEN];
void *addr;
struct addrinfo *res, *rp;
char ipaddr[INET6_ADDRSTRLEN];
void *addr;
struct addrinfo *res, *rp;
while ((opt = getopt(argc, argv, "46t:h")) > -1)
{
while ((opt = getopt(argc, argv, "46t:h")) > -1)
{
{
case '4':
hints.ai_family = AF_INET;
{
case '4':
hints.ai_family = AF_INET;