------------------------------------------------------------ revno: 11809 revision-id: squid3@treenet.co.nz-20130426041214-difekeq21w1kgsqf parent: squid3@treenet.co.nz-20130426041149-56ov60lq68ny1v9r committer: Amos Jeffries branch nick: 3.2 timestamp: Thu 2013-04-25 22:12:14 -0600 message: GNU 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-20130426041214-difekeq21w1kgsqf # target_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # testament_sha1: ea0ecf657ed729112bdf1aa7a47f77fd7e38ef2f # timestamp: 2013-04-26 04:14:24 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # base_revision_id: squid3@treenet.co.nz-20130426041149-\ # 56ov60lq68ny1v9r # # Begin patch === modified file 'src/DiskIO/Mmapped/MmappedFile.cc' --- src/DiskIO/Mmapped/MmappedFile.cc 2012-07-28 05:38:50 +0000 +++ src/DiskIO/Mmapped/MmappedFile.cc 2013-04-26 04:12:14 +0000 @@ -11,6 +11,11 @@ #include "DiskIO/WriteRequest.h" #include +// 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