]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: use MAP_ANON instead of MAP_ANONYMOUS
authorWilly Tarreau <w@1wt.eu>
Tue, 4 Sep 2012 13:43:25 +0000 (15:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Sep 2012 13:45:21 +0000 (15:45 +0200)
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.

src/shctx.c

index c6c67371be078b35d09251356caed368ef3169e5..48d95418bb932f4f7ca31e4e96a632b4ffda80bb 100644 (file)
@@ -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;