From: des Date: Thu, 6 Jul 2006 08:43:53 +0000 (+0000) Subject: Portability: don't use non-portable mmap(2) flags. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c73aec843dae5076cfa845d991e38dcef0b964c;p=varnish Portability: don't use non-portable mmap(2) flags. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@339 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_shmlog.c b/varnish-cache/bin/varnishd/cache_shmlog.c index 38ef3005..a8347012 100644 --- a/varnish-cache/bin/varnishd/cache_shmlog.c +++ b/varnish-cache/bin/varnishd/cache_shmlog.c @@ -18,6 +18,14 @@ #include "heritage.h" +#ifndef MAP_HASSEMAPHORE +#define MAP_HASSEMAPHORE 0 /* XXX Linux */ +#endif + +#ifndef MAP_NOSYNC +#define MAP_NOSYNC 0 /* XXX Linux */ +#endif + struct varnish_stats *VSL_stats; static struct shmloghead *loghead; diff --git a/varnish-cache/bin/varnishd/storage_file.c b/varnish-cache/bin/varnishd/storage_file.c index fef57127..c9967f4b 100644 --- a/varnish-cache/bin/varnishd/storage_file.c +++ b/varnish-cache/bin/varnishd/storage_file.c @@ -25,6 +25,14 @@ #include "shmlog.h" #include "cache.h" +#ifndef MAP_NOCORE +#define MAP_NOCORE 0 /* XXX Linux */ +#endif + +#ifndef MAP_NOSYNC +#define MAP_NOSYNC 0 /* XXX Linux */ +#endif + #define MINPAGES 128 /*--------------------------------------------------------------------*/ diff --git a/varnish-cache/lib/libvarnishapi/shmlog.c b/varnish-cache/lib/libvarnishapi/shmlog.c index 88a1fd53..ae5741e3 100644 --- a/varnish-cache/lib/libvarnishapi/shmlog.c +++ b/varnish-cache/lib/libvarnishapi/shmlog.c @@ -13,6 +13,10 @@ #include "shmlog.h" #include "varnishapi.h" +#ifndef MAP_HASSEMAPHORE +#define MAP_HASSEMAPHORE 0 /* XXX Linux */ +#endif + static unsigned char *logstart, *logend; struct shmloghead *