mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibC: A whole bunch of compat work towards porting Lynx.
This commit is contained in:
parent
48590a0e51
commit
2c3cf22bc9
10 changed files with 125 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -47,5 +48,14 @@ int inet_pton(int af, const char* src, void* dst)
|
|||
return 0;
|
||||
}
|
||||
|
||||
in_addr_t inet_addr(const char* str)
|
||||
{
|
||||
in_addr_t tmp;
|
||||
int rc = inet_pton(AF_INET, str, &tmp);
|
||||
if (rc < 0)
|
||||
return INADDR_NONE;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue