summary refs log tree commit diff stats
path: root/linux-user/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 18b52c00a4..99a7cde559 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2706,7 +2706,8 @@ int main(int argc, char **argv, char **envp)
     {
         struct rlimit lim;
         if (getrlimit(RLIMIT_STACK, &lim) == 0
-            && lim.rlim_cur != RLIM_INFINITY) {
+            && lim.rlim_cur != RLIM_INFINITY
+            && lim.rlim_cur == (target_long)lim.rlim_cur) {
             guest_stack_size = lim.rlim_cur;
         }
     }