mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibC: Add inet_ntoa()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ __BEGIN_DECLS
|
||||
const char* inet_ntop(int af, const void* src, char* dst, socklen_t);
|
||||
int inet_pton(int af, const char* src, void* dst);
|
||||
|
||||
char* inet_ntoa(struct in_addr);
|
||||
|
||||
inline uint16_t htons(uint16_t value)
|
||||
{
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
|
||||
Reference in New Issue
Block a user