From 2ebb3f3c0de9c8605cebcc844644e0b2aaaa6d22 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Mon, 19 Apr 2021 22:24:56 -0700 Subject: [PATCH] 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 --- Userland/Libraries/LibC/arpa/inet.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibC/arpa/inet.h b/Userland/Libraries/LibC/arpa/inet.h index 8949ab7f9d..c9022663fd 100644 --- a/Userland/Libraries/LibC/arpa/inet.h +++ b/Userland/Libraries/LibC/arpa/inet.h @@ -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);