projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use syscall_arg_t and __scc macro for arguments to __alt_socketcall
[musl]
/
src
/
network
/
inet_legacy.c
diff --git
a/src/network/inet_legacy.c
b/src/network/inet_legacy.c
index
dd75420
..
621b47b
100644
(file)
--- a/
src/network/inet_legacy.c
+++ b/
src/network/inet_legacy.c
@@
-1,24
+1,14
@@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include "__dns.h"
in_addr_t inet_network(const char *p)
{
return ntohl(inet_addr(p));
}
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
)
{
{
- struct sockaddr_in sin;
- int r = __ipparse(&sin, AF_INET, cp);
- *inp = sin.sin_addr;
- return r;
-}
-
-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;
if (n < 256) h |= n<<24;
else if (n < 65536) h |= n<<16;
else h |= n<<8;