------------------------------------------------------------ revno: 12533 revision-id: squid3@treenet.co.nz-20130424154326-cob1pc7eguux78b2 parent: squid3@treenet.co.nz-20130424154244-p2ioky23d4re0jou committer: Amos Jeffries branch nick: 3.3 timestamp: Wed 2013-04-24 09:43:26 -0600 message: Hurd: define MAP_NORESERVE as no-op when missing Some systems like GNU Hurd provide the mmap() API but lack MAP_NORESERVE support. This option is an optimization, so we can define the macro ourselves to nil and apparently not suffer (many) bad side effects. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130424154326-cob1pc7eguux78b2 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 8e4a68e3e477ed76adb83cf9be07c84b004c69b5 # timestamp: 2013-04-24 15:44:06 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20130424154244-\ # p2ioky23d4re0jou # # Begin patch === modified file 'src/DiskIO/Mmapped/MmappedFile.cc' --- src/DiskIO/Mmapped/MmappedFile.cc 2012-09-01 14:38:36 +0000 +++ src/DiskIO/Mmapped/MmappedFile.cc 2013-04-24 15:43:26 +0000 @@ -21,6 +21,11 @@ #include #endif +// Some systems such as Hurd provide mmap() API but do not support MAP_NORESERVE +#ifndef MAP_NORESERVE +#define MAP_NORESERVE 0 +#endif + CBDATA_CLASS_INIT(MmappedFile); // helper class to deal with mmap(2) offset alignment and other low-level specs