1 // horrible kludge for solaris 2 #include <sys/types.h> 3 #include <sys/socket.h> 4 #include <netinet/in.h> 5 #include <arpa/inet.h> 6 7 #ifndef HAVE_INET_ATON 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 inet_aton(const char * cp,struct in_addr * inp)13int inet_aton(const char *cp, struct in_addr *inp) 14 { 15 inp->s_addr = inet_addr(cp); 16 return (inp->s_addr != (in_addr_t)-1); 17 } 18 19 #ifdef __cplusplus 20 } 21 #endif 22 23 #endif 24