1
Fork 0
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:
Andreas Kling 2019-03-14 15:18:15 +01:00
parent 48590a0e51
commit 2c3cf22bc9
10 changed files with 125 additions and 5 deletions

View file

@ -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;
}
}