xref: /third_party/musl/src/network/inet_addr.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/src/network/
1570af302Sopenharmony_ci#include <sys/socket.h>
2570af302Sopenharmony_ci#include <netinet/in.h>
3570af302Sopenharmony_ci#include <arpa/inet.h>
4570af302Sopenharmony_ci
5570af302Sopenharmony_ciin_addr_t inet_addr(const char *p)
6570af302Sopenharmony_ci{
7570af302Sopenharmony_ci	struct in_addr a;
8570af302Sopenharmony_ci	if (!__inet_aton(p, &a)) return -1;
9570af302Sopenharmony_ci	return a.s_addr;
10570af302Sopenharmony_ci}
11

Indexes created Thu Nov 07 10:32:03 CST 2024