Skip to content

Commit 1fa030d

Browse files
committed
Merge FEATURE-ci-freebsd-address-header: declare POSIX address families directly
2 parents 98dfdc4 + eb3c7d1 commit 1fa030d

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# FEATURE-ci-freebsd-address-header: include the address-family declaration owner
2+
3+
Status: Complete (local implementation, validation and finalization; native CI pending).
4+
Base: `v3` at `98dfdc4de8d6be5355c0d2f9b94518ea53a6fc8d`.
5+
6+
FreeBSD package run `40030060276` / job `120675819652` and archive run
7+
`40030063567` / job `120676108128`, source
8+
`0cbf18116f63e0762aaad19b16358e6f61dddf04`, both fail compiling
9+
`src/net/address.cpp`: `AF_INET` and `AF_INET6` are undeclared in the two
10+
`inet_pton` and two `inet_ntop` calls. Each compile reports four errors;
11+
`net/address.lo` fails and outer `gmake` exits 2. These actual native compile
12+
failures are the RED evidence preceding this change.
13+
14+
The [FreeBSD 14.3 socket header](https://github.com/freebsd/freebsd-src/blob/releng/14.3/sys/sys/socket.h)
15+
defines the address-family macros (lines 216 and 246). The
16+
[FreeBSD 14.3 inet manual](https://man.freebsd.org/cgi/man.cgi?query=inet_pton&sektion=3&manpath=FreeBSD+14.3-RELEASE)
17+
includes `sys/socket.h` in the synopsis. Its
18+
[arpa/inet.h](https://github.com/freebsd/freebsd-src/blob/releng/14.3/include/arpa/inet.h)
19+
declares the conversion routines but does not include that macro owner.
20+
The bounded header-ownership question is resolved: include `sys/socket.h`
21+
directly in the private POSIX include arm of `src/net/address.cpp`.
22+
23+
Action items:
24+
25+
- [x] Read the accepted plan, literal journal, primary CLAUDE guidance, owning
26+
headers, implementation, existing address tests and v3 source ownership.
27+
- [x] Create the Groundwork identity helper's exact isolated worktree/branch
28+
from the exact local v3 base; preserve unrelated bauth work.
29+
- [x] Inspect both actual native compile failures and verify declaration
30+
ownership against official FreeBSD 14.3 sources/manual before editing.
31+
- [x] Add only the direct private POSIX declaration include; preserve the
32+
Windows arm, installed headers, conversion calls and address semantics.
33+
- [x] Compile the actual changed source and execute the existing IPv4/IPv6
34+
address unit suite locally; run changed-C++ cpplint and diff checks.
35+
- [x] Record local checks, native evidence limits and implementation handoff
36+
in the existing journal.
37+
- [x] Caller: Groundwork validation and local finalization into v3.
38+
- [ ] CI / v3 PR: post-fix native FreeBSD source/package/archive execution.
39+
40+
No new source-text assertion is appropriate for this one-include repair:
41+
the native compile failures establish RED, and the existing address suite
42+
already exercises actual parsing, formatting, mapped-address normalization,
43+
CIDR/wildcard matching and invalid spellings. A focused Linux baseline
44+
compile and its 13 existing address tests passed before editing; this is
45+
local baseline evidence, not a reproduction of the FreeBSD failure.
46+
47+
Post-fix verification: GNU g++ 13.3.0 compiled the actual changed
48+
`src/net/address.cpp`, `src/detail/net_address.cpp` and existing
49+
`test/unit/net_address_test.cpp` with `-std=c++20 -Wall -Wextra
50+
-DHTTPSERVER_COMPILATION -Isrc -Itest`, with no compiler output. The resulting
51+
local Linux executable passed all 13 tests and 92 checks, with no skips.
52+
`cpplint src/net/address.cpp` and `git diff --check` pass. These bounded
53+
checks do not constitute a whole-library or native FreeBSD package/ABI pass.
54+
55+
Project notes: this focused address suite can link the two real address
56+
translation units directly, without Autotools setup or a full native build.
57+
No source fallback constants, SDK simulation or additional test framework is
58+
needed. The primary checkout's untracked CLAUDE.md supplies C++ conventions
59+
even when absent from an isolated worktree.
60+
61+
Raw evidence and the journal remain in the primary checkout at
62+
`.debug/ci-freebsd-address-header-or7k_xeb/`. Post-fix native FreeBSD checks
63+
remain incomplete and CI/v3-PR owned under AGENTS. The unknown five Darwin
64+
C++ causes and earlier closed investigations remain closed; no unrelated
65+
runtime, fixture, SDK, compiler or workflow repair is included.
66+
67+
Groundwork validation `02b0951d488a1bcb1bf8efe5c421cd89` passed in one
68+
iteration, with all nine independent profiles approved, zero fixes and zero
69+
unworked findings. It sealed implementation HEAD `2ecf3875d72831688df7508f8a1443bc5a6cb4e5`.
70+
Overall CI remains unsuccessful until new native checks complete.

‎src/net/address.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <ws2tcpip.h>
4545
#else
4646
#include <arpa/inet.h>
47+
#include <sys/socket.h>
4748
#endif
4849

4950
#include <httpserver/detail/net_address.hpp>

0 commit comments

Comments
 (0)