]> git.llucax.com Git - software/dgc/cdgc.git/commitdiff
Make sure MAP_ANON exists when using mmap()
authorLeandro Lucarella <llucax@gmail.com>
Sat, 16 Jan 2010 23:43:54 +0000 (20:43 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Sat, 16 Jan 2010 23:43:54 +0000 (20:43 -0300)
gc/alloc.d

index 6fd156e2cfe7dfa0e64588ad1094dfcf01637f50..9c6d249ec25799333045728aeb9bfc512acee5a3 100644 (file)
@@ -128,7 +128,7 @@ static if (is(typeof(VirtualAlloc)))
         return cast(int)(VirtualFree(base, 0, MEM_RELEASE) == 0);
     }
 }
         return cast(int)(VirtualFree(base, 0, MEM_RELEASE) == 0);
     }
 }
-else static if (is(typeof(mmap)))
+else static if (is(typeof(mmap)) && is(typeof(MAP_ANON)))
 {
     void *os_mem_map(size_t nbytes)
     {   void *p;
 {
     void *os_mem_map(size_t nbytes)
     {   void *p;