Page MenuHomeFreeBSD

[libnetmap] Fix 32 bit compilation on gcc-6.3
ClosedPublic

Authored by adrian on Oct 15 2020, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 22 2024, 8:58 PM
Unknown Object (File)
Mar 12 2024, 4:44 PM
Unknown Object (File)
Feb 2 2024, 9:40 PM
Unknown Object (File)
Jan 7 2024, 2:39 AM
Unknown Object (File)
Jan 4 2024, 9:47 AM
Unknown Object (File)
Dec 21 2023, 9:54 PM
Unknown Object (File)
Dec 17 2023, 4:12 PM
Unknown Object (File)
Dec 14 2023, 10:01 PM
Subscribers

Details

Summary

This fixes 32 bit compilation (lib32 and native 32 bit target)
under gcc-6.3.

Test Plan
  • compiled on gcc-6.4 for amd64 and mips targets

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

You're going to need a lot more than 'fix compilation' for these patchs. Why do you need it? It super uglifies the code for no benefit.

  • it fails on 32 bit compilations and we don't special case libnetmap to only compile on 64 bit platforms
  • it fails on 64 bit platforms when compiling lib32, which blocks the amd64 buildworld
  • since nr_options is a uint64_t and we're using it as a pointer type, we really should not be assuming pointer == sizeof(int type) like this
imp requested changes to this revision.Oct 15 2020, 4:56 PM

I think that it would be better to use the nmreq_foreeach_option macro in these locations. It looks like it would expand to the same thing and future proof things a little better...

This revision now requires changes to proceed.Oct 15 2020, 4:56 PM

Update with imp's comments

This revision is now accepted and ready to land.Nov 2 2020, 5:46 AM
This revision was automatically updated to reflect the committed changes.