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)
Sat, Jun 22, 8:37 AM
Unknown Object (File)
Apr 28 2024, 9:43 AM
Unknown Object (File)
Apr 25 2024, 10:32 PM
Unknown Object (File)
Apr 25 2024, 10:32 PM
Unknown Object (File)
Apr 25 2024, 9:30 PM
Unknown Object (File)
Apr 25 2024, 9:30 PM
Unknown Object (File)
Apr 25 2024, 5:40 AM
Unknown Object (File)
Apr 23 2024, 9:19 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 Not Applicable
Unit
Tests Not Applicable

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.