Compile fix for NaCL

TBR=mstarzinger@chromium.org
BUG=none
LOG=n

Review URL: https://codereview.chromium.org/228953002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jochen@chromium.org 2014-04-08 18:12:00 +00:00
parent a9d9b72989
commit 60422b4541

View File

@ -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;
}