Page MenuHomeFreeBSD

linux(4): Rename struct l_ifreq members names to avoid conflicts with FreeBSD
ClosedPublic

Authored by dchagin on Feb 26 2023, 10:00 AM.
Referenced Files
Unknown Object (File)
Sun, Oct 5, 9:21 AM
Unknown Object (File)
Sun, Oct 5, 4:14 AM
Unknown Object (File)
Fri, Oct 3, 6:40 AM
Unknown Object (File)
Fri, Oct 3, 6:39 AM
Unknown Object (File)
Fri, Oct 3, 6:39 AM
Unknown Object (File)
Fri, Oct 3, 6:39 AM
Unknown Object (File)
Fri, Oct 3, 12:03 AM
Unknown Object (File)
Thu, Oct 2, 11:38 PM
Subscribers

Details

Summary

For now we are using mixed names to access struct ifreq members, some
of Linux (ifr_name, ifr_ifindex), others of FreeBSD. To avoid conflicts
switch to use FreeBSD names.

Reported by: jhibbits

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 50111
Build 47003: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 27 2023, 12:40 AM
melifaro added inline comments.
sys/compat/linux/linux_socket.h
342

I'd explicitly add Static_assert() conditions on each of the fields in linux_something.c.
People don't read notes but have to read compiler errors :-)

assert most important names of the struct ifreq members are equal to native ifreq

This revision now requires review to proceed.Mar 2 2023, 7:27 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 4 2023, 9:14 AM
This revision was automatically updated to reflect the committed changes.