1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibC: Add inet_ntoa()

This commit is contained in:
Andreas Kling 2020-02-20 06:57:47 +01:00
parent 0ba458cfa0
commit cf4da485e6
2 changed files with 9 additions and 0 deletions

View file

@ -82,4 +82,11 @@ in_addr_t inet_addr(const char* str)
return INADDR_NONE;
return tmp;
}
char* inet_ntoa(struct in_addr in)
{
static char buffer[32];
inet_ntop(AF_INET, &in.s_addr, buffer, sizeof(buffer));
return buffer;
}
}