From Albert Chin
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 16 Jun 2006 21:30:58 +0000 (21:30 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 16 Jun 2006 21:30:58 +0000 (21:30 +0000)
HP-UX doesn't have MAP_ANON but it does have MAP_ANONYMOUS. Moreoever,
according to mmap(2) on RHEL:
       MAP_ANONYMOUS
              The mapping is not backed by any file; the fd and offset argu-
              ments are ignored.  This flag in conjunction with MAP_SHARED is
              implemented since Linux 2.4.

       MAP_ANON
              Alias for MAP_ANONYMOUS. Deprecated.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18486 f5534014-38df-0310-8fa8-9805f1628bb7

epan/emem.c

index 40f5f586113b16556abb5261be941d3def51413d..9b95de91893ffcf2cc67b2d1c1b8d2173223e6b5 100644 (file)
@@ -288,7 +288,7 @@ emem_create_chunk(emem_chunk_t **free_list) {
 
 #elif defined(USE_GUARD_PAGES)
                npc->buf = mmap(NULL, EMEM_PACKET_CHUNK_SIZE,
-                       PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
+                       PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
                g_assert(npc->buf != MAP_FAILED);
                buf_end = npc->buf + EMEM_PACKET_CHUNK_SIZE;