[all-commits] [llvm/llvm-project] 96f5b1: [libc] Add netinet/udp.h containing struct udphdr ...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Mon Jun 1 08:38:27 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 96f5b177203af235f59e9c3512dd3734a4edbefb
https://github.com/llvm/llvm-project/commit/96f5b177203af235f59e9c3512dd3734a4edbefb
Author: Pavel Labath <pavel at labath.sk>
Date: 2026-06-01 (Mon, 01 Jun 2026)
Changed paths:
M libc/config/linux/aarch64/headers.txt
M libc/config/linux/riscv/headers.txt
M libc/config/linux/x86_64/headers.txt
M libc/hdr/types/CMakeLists.txt
A libc/hdr/types/struct_udphdr.h
M libc/include/CMakeLists.txt
M libc/include/llvm-libc-types/CMakeLists.txt
A libc/include/llvm-libc-types/struct_udphdr.h
A libc/include/netinet/udp.yaml
M libc/test/src/CMakeLists.txt
A libc/test/src/netinet/CMakeLists.txt
A libc/test/src/netinet/udp_test.cpp
Log Message:
-----------
[libc] Add netinet/udp.h containing struct udphdr (#200839)
This patch adds a generated <netinet/udp.h> containing the `udphdr`
structure definition.
There are two styles ("linux" and "BSD") of udphdr field names (and both
of them can be found in the wild), so I follow the glibc and bionic
approach of using an anonymous union. (musl uses a #define on the field
names, which doesn't seem that great).
I've added the target to `include/CMakeLists.txt` and registered it
under target lists in `headers.txt` for the supported Linux platforms
(x86_64, aarch64, and riscv).
To verify layout and alignment correctness, I've added a layout and
field compatibility unit test under `test/src/netinet/udp_test.cpp`.
Assisted by Gemini.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list