projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove inclusion guard hacks for sys/kd.h
[musl]
/
src
/
network
/
inet_addr.c
diff --git
a/src/network/inet_addr.c
b/src/network/inet_addr.c
index
8413728
..
10b21f2
100644
(file)
--- a/
src/network/inet_addr.c
+++ b/
src/network/inet_addr.c
@@
-1,11
+1,12
@@
#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"
+
+int __inet_aton(const char *, struct in_addr *);
in_addr_t inet_addr(const char *p)
{
in_addr_t inet_addr(const char *p)
{
- struct
sockaddr_in sin
;
- if (
__ipparse(&sin, AF_INET, p
)) return -1;
- return
sin.sin_addr
.s_addr;
+ struct
in_addr a
;
+ if (
!__inet_aton(p, &a
)) return -1;
+ return
a
.s_addr;
}
}