1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

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
parent a1720eed2a
commit 2ebb3f3c0d

View file

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