Issue 24405 - FreeBSD's ifaddrs missing the ifa_broadaddr field
Summary: FreeBSD's ifaddrs missing the ifa_broadaddr field
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All FreeBSD
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2024-02-23 08:26 UTC by Jonathan M Davis
Modified: 2024-02-23 09:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jonathan M Davis 2024-02-23 08:26:27 UTC
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 Dlang Bot 2024-02-23 08:31:15 UTC
@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 Dlang Bot 2024-02-23 09:54:14 UTC
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