From: Willy Tarreau Date: Tue, 4 Sep 2012 13:43:25 +0000 (+0200) Subject: BUILD: ssl: use MAP_ANON instead of MAP_ANONYMOUS X-Git-Tag: v1.5-dev12~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee2e3a4027e3a35c43790667a8d61865d93f7ec3;p=thirdparty%2Fhaproxy.git BUILD: ssl: use MAP_ANON instead of MAP_ANONYMOUS FreeBSD uses the former, Linux uses the latter but generally also defines the former as an alias of the latter. Just checked on other OSes and AIX defines both. So better use MAP_ANON which seems to be more commonly defined. --- diff --git a/src/shctx.c b/src/shctx.c index c6c67371be..48d95418bb 100644 --- a/src/shctx.c +++ b/src/shctx.c @@ -372,7 +372,7 @@ int shared_context_init(int size) size = SHCTX_DEFAULT_SIZE; shctx = (struct shared_context *)mmap(NULL, sizeof(struct shared_context)+(size*sizeof(struct shared_session)), - PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); + PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); if (!shctx || shctx == MAP_FAILED) { shctx = NULL; return -1;