Bug 24405 – FreeBSD's ifaddrs missing the ifa_broadaddr field

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
FreeBSD
Creation time
2024-02-23T08:26:27Z
Last change time
2024-02-23T09:54:14Z
Keywords
pull
Assigned to
No Owner
Creator
Jonathan M Davis

Comments

Comment #0 by issues.dlang — 2024-02-23T08:26:27Z
FreeBSD defines the ifa_broadaddr field as being #defined to ifa_dstaddr, and I missed it when adding FreeBSD's ifaddrs to druntime. The man page clearly mentions it, but it doesn't provide the actual struct definition: https://man.freebsd.org/cgi/man.cgi?getifaddrs
Comment #1 by dlang-bot — 2024-02-23T08:31:15Z
@jmdavis created dlang/dmd pull request #16234 "Fix Bugzilla issue 24405 - FreeBSD's ifaddrs missing the ifa_broadaddr field." fixing this issue: - Fix Bugzilla issue 24405 - FreeBSD's ifaddrs missing the ifa_broadaddr field. FreeBSD #defines ifa_broadaddr to be ifa_dstaddr, and I missed it when adding it to druntime. So, this adds the appropriate alias. It does feel a bit weird to list the alias before the field that it's aliasing, but that's the order presented in the man page, so it's what I did. https://github.com/dlang/dmd/pull/16234
Comment #2 by dlang-bot — 2024-02-23T09:54:14Z
dlang/dmd pull request #16234 "Fix Bugzilla issue 24405 - FreeBSD's ifaddrs missing the ifa_broadaddr field." was merged into master: - 12120311224ddcbd80c40bcca8af7d12f315d761 by Jonathan M Davis: Fix Bugzilla issue 24405 - FreeBSD's ifaddrs missing the ifa_broadaddr field. FreeBSD #defines ifa_broadaddr to be ifa_dstaddr, and I missed it when adding it to druntime. So, this adds the appropriate alias. It does feel a bit weird to list the alias before the field that it's aliasing, but that's the order presented in the man page, so it's what I did. https://github.com/dlang/dmd/pull/16234