[libc-commits] [libc] [libc] Have netdb.h carry netinet/in.h (PR #241697)

Mike Lothian via libc-commits libc-commits at lists.llvm.org
Fri Nov 13 02:57:41 PST 2026


https://github.com/FireBurn updated https://github.com/llvm/llvm-project/pull/241697

>From 3e111b923c4a085a7bf1b08171c02d4d1bb8b2de Mon Sep 17 00:00:00 2001
From: Mike Lothian <mike at fireburn.co.uk>
Date: Sun, 6 Sep 2026 11:30:18 +0100
Subject: [PATCH] [libc] Have netdb.h carry netinet/in.h

A program that included `<netdb.h>` to look an address up and then read the `sockaddr_in` it was handed found the type incomplete. shadow does exactly that when it records where a login came from

AI disclosure: this patch was written with Claude Code. I reviewed the change and built it in a full build, and the include and header tests pass

Assisted-by: Claude
---
 libc/include/netdb.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libc/include/netdb.yaml b/libc/include/netdb.yaml
index 84e6827abd889..f65e1dd4f5a1f 100644
--- a/libc/include/netdb.yaml
+++ b/libc/include/netdb.yaml
@@ -1,4 +1,7 @@
 header: netdb.h
+public_includes:
+  # POSIX allows <netdb.h> to make the symbols of <netinet/in.h> visible.
+  - netinet/in.h
 standards:
   - posix
 macros:



More information about the libc-commits mailing list