1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[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
This commit is contained in:
Fangrui Song 2019-05-02 05:58:09 +00:00
parent e079e36506
commit 7c3c4b0149

View File

@ -93,14 +93,7 @@ Memory::allocateMappedMemory(size_t NumBytes,
int fd = -1;
int MMFlags = MAP_PRIVATE |
#ifdef MAP_ANONYMOUS
MAP_ANONYMOUS
#else
MAP_ANON
#endif
; // Ends statement above
int MMFlags = MAP_PRIVATE | MAP_ANON;
int Protect = getPosixProtectionFlags(PFlags);
#if defined(__NetBSD__) && defined(PROT_MPROTECT)