Bug 196622

Summary: vm_map.h defines "min_offset" and "max_offset" which causes namespace pollution.
Product: Base System Reporter: tjj5036
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Description Flags
Patch to correct min_offset and max_offset none

Description tjj5036 2015-01-12 17:48:55 UTC
In vm_map.h, there is a struct called vm_map that has two members named
min_offset and max_offset respectively. There are macros that define these two
to header.start and header.end respectively. Unfortunately, if you include
vm_map.h anywhere, it causes issues with anything also declared to be min_/max_
offset. ZFS actually undefines them. This fix would remove the defines, making
it so you can include the header safely without fear of unexpected bugs.

Comment 1 Gavin Atkinson freebsd_committer freebsd_triage 2015-01-12 18:49:00 UTC

Due to an issue with the backend FreeBSD Bugzilla database, your original PR and any updates to it since have been lost.  I've recreated the original PR as best as I can, however any attachments and updates you submitted to the PR have been lost.  Please could you resubmit them?

Thanks, and apologies.
Comment 2 tjj5036 2015-01-12 21:37:14 UTC
Created attachment 151505 [details]
Patch to correct min_offset and max_offset