[libc-commits] [libc] [libc] Move INET_ADDRSTRLEN and INET6_ADDRSTRLEN to a common header (PR #201083)

Jeff Bailey via libc-commits libc-commits at lists.llvm.org
Tue Jun 2 08:01:04 PDT 2026


================
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// Definition of internet address macros
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_MACROS_INET_ADDRESS_MACROS_H
+#define LLVM_LIBC_MACROS_INET_ADDRESS_MACROS_H
+
+#define INET_ADDRSTRLEN 16
+#define INET6_ADDRSTRLEN 46
----------------
kaladron wrote:

```suggestion
#define INET6_ADDRSTRLEN 46 // Support a full IPv6 + 1
```

https://github.com/llvm/llvm-project/pull/201083


More information about the libc-commits mailing list