Hi Eial,

On Tue, Jul 03, 2012 at 10:57:50AM +0300, Eial Czerwacki wrote:
> I'd like to propose a new applet, gethostbyname.
> all this applet does is to get a host name and return the first ip address.

IMHO, this applet should be called 'host', just like the similarly named BIND 
utility.

[snip]

> +int gethostbyname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
> +int gethostbyname_main(int argc, char **argv) {
> +    struct hostent *tmp = 0;
> +
> +    if (argc < 2) {
> +        bb_show_usage();
> +    }
> +
> +    tmp = gethostbyname(argv[1]);

gethostbyname() is obsolete. Please use either current POSIX standard 
getaddrinfo() or INET_resolve() from libbb.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to