2 #include <sys/socket.h>
3 #include <netinet/in.h>
7 int __inet_aton(const char *s0
, struct in_addr
*dest
)
10 unsigned char *d
= (void *)dest
;
11 unsigned long a
[4] = { 0 };
16 a
[i
] = strtoul(s
, &z
, 0);
17 if (z
==s
|| (*z
&& *z
!= '.') || !isdigit(*s
))
25 a
[1] = a
[0] & 0xffffff;
35 if (a
[i
] > 255) return 0;
41 weak_alias(__inet_aton
, inet_aton
);