Commit 60422b45 authored by jochen@chromium.org's avatar jochen@chromium.org

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
parent a9d9b729
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment