X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fnetwork%2Finet_legacy.c;h=621b47b05086d98843a71b6b2a4589ef9238fb17;hb=455bd824457b3e6cc3998817aac4e500b027cc50;hp=9907c541154ff758a187a519c1b30ee4345dc43a;hpb=bb93ac335846424662212eea840859e7f0cc16b5;p=musl diff --git a/src/network/inet_legacy.c b/src/network/inet_legacy.c index 9907c541..621b47b0 100644 --- a/src/network/inet_legacy.c +++ b/src/network/inet_legacy.c @@ -1,21 +1,14 @@ #include #include #include -#include "__dns.h" in_addr_t inet_network(const char *p) { return ntohl(inet_addr(p)); } -int inet_aton(const char *cp, struct in_addr *inp) +struct in_addr inet_makeaddr(in_addr_t n, in_addr_t h) { - return inet_pton(AF_INET, cp, (void *)inp) > 0; -} - -struct in_addr inet_makeaddr(int net, int host) -{ - uint32_t n = net, h = host; if (n < 256) h |= n<<24; else if (n < 65536) h |= n<<16; else h |= n<<8;