# include <netdb.h>
# include <unistd.h>
# include <sys/param.h>
+# include <arpa/inet.h>
#endif
#include <fcntl.h>
#include <errno.h>
switch(hostptr->h_addrtype) {
struct in_addr *ptr1;
- char *ptr;
case AF_INET:
- ptr = hostptr->h_addr_list[0];
- ptr1 = (struct in_addr *) ptr;
+ ptr1 = (struct in_addr *) hostptr->h_addr_list[0];
hostip = inet_ntoa(*ptr1);
break;
default:
switch(hostptr->h_addrtype) {
struct in_addr *ptr1;
- char *ptr;
case AF_INET:
- ptr = hostptr->h_addr_list[0];
- ptr1 = (struct in_addr *) ptr;
+ ptr1 = (struct in_addr *) hostptr->h_addr_list[0];
hostip = inet_ntoa(*ptr1);
break;
default:
switch(hostptr->h_addrtype) {
struct in_addr *ptr1;
- char *ptr;
case AF_INET:
- ptr = hostptr->h_addr_list[0];
- ptr1 = (struct in_addr *) ptr;
+ ptr1 = (struct in_addr *) hostptr->h_addr_list[0];
hostip = inet_ntoa(*ptr1);
break;
default: