Index: lib/Support/Unix/Program.inc |
diff --git a/lib/Support/Unix/Program.inc b/lib/Support/Unix/Program.inc |
index 0f45df1a0da0e20fd9bd12dfbeed03c0a979f070..0ec69c7f45323daf089acddcf8fef6625670ba1a 100644 |
--- a/lib/Support/Unix/Program.inc |
+++ b/lib/Support/Unix/Program.inc |
@@ -310,7 +310,9 @@ namespace llvm { |
ProcessInfo sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait, |
bool WaitUntilTerminates, std::string *ErrMsg) { |
-#ifdef HAVE_SYS_WAIT_H |
+ // @LOCALMOD-BEGIN |
+#if defined(HAVE_SYS_WAIT_H) && !defined(PNACL_BROWSER_TRANSLATOR) |
+ // @LOCALMOD-END |
struct sigaction Act, Old; |
assert(PI.Pid && "invalid pid to wait on, process not started?"); |
@@ -441,7 +443,11 @@ llvm::sys::writeFileWithEncoding(StringRef FileName, StringRef Contents, |
} |
bool llvm::sys::argumentsFitWithinSystemLimits(ArrayRef<const char*> Args) { |
+#if defined(__native_client__) |
+ static long ArgMax = -1; |
+#else // !__native_client__ |
static long ArgMax = sysconf(_SC_ARG_MAX); |
+#endif // __native_client__ |
// System says no practical limit. |
if (ArgMax == -1) |