LibC: Add a definition for INET6_ADDRSTRLEN

Although serenity doesn't implement IPv6 yet, applications
will often declare buffers to be of size `INET6_ADDRSTRLEN`
so it's guaranteed to work in both IPv4 / IPv6 environments.

This is needed specifically for a port of Flexible IO Tester
https://fio.readthedocs.io

This is standardized here:
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/netinet/in.h.html
This commit is contained in:
Brian Gianforcaro 2021-04-19 22:24:56 -07:00 committed by Linus Groh
commit 2ebb3f3c0d
Notes: sideshowbarker 2024-07-18 19:19:00 +09:00

View file

@ -35,6 +35,7 @@
__BEGIN_DECLS
#define INET_ADDRSTRLEN 16
#define INET6_ADDRSTRLEN 46
const char* inet_ntop(int af, const void* src, char* dst, socklen_t);
int inet_pton(int af, const char* src, void* dst);