mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Improve getservbyname and getservbyport (#207)
- support aliases in /etc/services - use case insensitive comparisons - add tests
This commit is contained in:
parent
58fb2fb3d3
commit
c0bec24fa2
7 changed files with 202 additions and 58 deletions
|
@ -31,9 +31,9 @@
|
|||
|
||||
struct hostent *gethostbyaddr(const void *s_addr, socklen_t len, int type) {
|
||||
static struct hostent *ptr1, he1;
|
||||
static char h_name[DNS_NAME_MAX+1];
|
||||
static char* h_aliases[1];
|
||||
static char* h_addr_list[2];
|
||||
static char h_name[DNS_NAME_MAX + 1];
|
||||
static char *h_aliases[1];
|
||||
static char *h_addr_list[2];
|
||||
static char h_addr_list0[4];
|
||||
|
||||
struct sockaddr_in addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue