]> granicus.if.org Git - strace/commitdiff
MAP_ANON is the same as MAP_ANONYMOUS, no need to have the former
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 17 Mar 2012 00:29:40 +0000 (01:29 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 17 Mar 2012 00:29:40 +0000 (01:29 +0100)
* mem.c: Do not allocate string for MAP_ANON if it is the same as
MAP_ANONYMOUS.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
mem.c

diff --git a/mem.c b/mem.c
index 320535e7a3b3ca3fdb4d1bb2933ca2e2772335b6..72b30decc2380ffa8dcc54de71af8753e8fbc8be 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -150,7 +150,7 @@ static const struct xlat mmap_flags[] = {
        { MAP_LOCKED,   "MAP_LOCKED"    },
 #endif
        /* FreeBSD ones */
-#ifdef MAP_ANON
+#if defined(MAP_ANON) && (!defined(MAP_ANONYMOUS) || MAP_ANON != MAP_ANONYMOUS)
        { MAP_ANON,     "MAP_ANON"      },
 #endif
 #ifdef MAP_HASSEMAPHORE