Reviewers: Michael Starzinger,
Description:
Compile fix for NaCL
[email protected]
BUG=none
LOG=n
Please review this at https://codereview.chromium.org/228953002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -0 lines):
M src/platform-posix.cc
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;
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.