Skip to content

Commit 7d0e8cb

Browse files
committed
[Support] Don't check MAP_ANONYMOUS, just use MAP_ANON
Though being marked "deprecated" by the Linux man-pages project (MAP_ANON is a synonym of MAP_ANONYMOUS), it is the mostly widely available macro - many systems that don't provide MAP_ANONYMOUS have MAP_ANON. MAP_ANON is also used here and there in compiler-rt. llvm-svn: 359758
1 parent 64399da commit 7d0e8cb

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

llvm/lib/Support/Unix/Memory.inc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,7 @@ Memory::allocateMappedMemory(size_t NumBytes,
9393

9494
int fd = -1;
9595

96-
int MMFlags = MAP_PRIVATE |
97-
#ifdef MAP_ANONYMOUS
98-
MAP_ANONYMOUS
99-
#else
100-
MAP_ANON
101-
#endif
102-
; // Ends statement above
103-
96+
int MMFlags = MAP_PRIVATE | MAP_ANON;
10497
int Protect = getPosixProtectionFlags(PFlags);
10598

10699
#if defined(__NetBSD__) && defined(PROT_MPROTECT)

0 commit comments

Comments
 (0)