Bug 196622 - vm_map.h defines "min_offset" and "max_offset" which causes namespace pollution.
Summary: vm_map.h defines "min_offset" and "max_offset" which causes namespace pollution.
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD bugs mailing list
Depends on:
Reported: 2015-01-12 17:48 UTC by tjj5036
Modified: 2015-01-13 16:21 UTC (History)
0 users

See Also:

Patch to correct min_offset and max_offset (1.15 KB, patch)
2015-01-12 21:37 UTC, tjj5036
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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