| Index: src/platform-posix.cc
|
| diff --git a/src/platform-posix.cc b/src/platform-posix.cc
|
| index d676d5d168a0a758a8be6a9d7796687d88e62015..a3a003593f3f652e7f9c960925d7e3c6f92fa7bf 100644
|
| --- a/src/platform-posix.cc
|
| +++ b/src/platform-posix.cc
|
| @@ -96,7 +96,12 @@ intptr_t OS::MaxVirtualMemory() {
|
| struct rlimit limit;
|
| int result = getrlimit(RLIMIT_DATA, &limit);
|
| if (result != 0) return 0;
|
| +#if V8_OS_NACL
|
| + // The NaCl compiler doesn't like resource.h constants.
|
| + if (static_cast<int>(limit.rlim_cur) == -1) return 0;
|
| +#else
|
| if (limit.rlim_cur == RLIM_INFINITY) return 0;
|
| +#endif
|
| return limit.rlim_cur;
|
| }
|
|
|
|
|