lib/net: export sockaddrin for sep export-hygiene (M4 E3, #102)

connect/bind export `*sockaddrin`, so under --sep the .wwi producer's
check_exported_type (both stages, correctly) rejects an exported decl
referencing the unexported type. Invisible on the old combined path
(net inlined, fed to w6c without -I). Hare exports sockaddr_in
(ref/hare/sys/+linux/socket.ha:11) and lib/net plays Hare's sys role,
so the caller must be able to name it. Same class as #48. No codegen
change (export is a checker property); byte-id holds.
This commit is contained in:
2026-06-18 17:26:09 +09:00
parent bbd2ad390a
commit 4583977ce0

View File

@@ -20,7 +20,9 @@ def SYS_LISTEN: i64 = 50;
// sockaddrin is laid out by the kernel: family u16, port u16 (BE),
// addr u32 (BE), padding 8B = 16B total. Caller fills it.
type sockaddrin = struct {
// Exported: connect/bind take *sockaddrin, so a caller must be able to
// name it (Hare exports sockaddr_in; ref/hare/sys/+linux/socket.ha:11). #102
export type sockaddrin = struct {
family: u16,
port: u16,
addr: u32,