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)
Wed, Jan 22, 6:02 AM
Unknown Object (File)
Sat, Jan 18, 5:50 PM
Unknown Object (File)
Tue, Jan 14, 6:27 AM
Unknown Object (File)
Sun, Jan 12, 7:17 AM
Unknown Object (File)
Dec 22 2024, 9:50 AM
Unknown Object (File)
Nov 27 2024, 5:18 AM
Unknown Object (File)
Sep 27 2024, 2:49 PM
Unknown Object (File)
Sep 27 2024, 1:29 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.