From: Amos Jeffries Date: Wed, 24 Apr 2013 07:47:19 +0000 (-0600) Subject: Hurd: define MAP_NORESERVE as no-op when missing X-Git-Tag: SQUID_3_4_0_1~188 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=def2dae16254ab9b38ed80ebc1578be61a56c15c;p=thirdparty%2Fsquid.git Hurd: define MAP_NORESERVE as no-op when missing Some systems like GNU Hurd provide teh 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. --- diff --git a/src/DiskIO/Mmapped/MmappedFile.cc b/src/DiskIO/Mmapped/MmappedFile.cc index 5ae8c50a94..82a4d68b52 100644 --- a/src/DiskIO/Mmapped/MmappedFile.cc +++ b/src/DiskIO/Mmapped/MmappedFile.cc @@ -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