2017-03-29 06:22:10 +02:00
|
|
|
From acf69d83c150761a8016e2f68a642b781808a6c6 Mon Sep 17 00:00:00 2001
|
2016-09-19 19:06:58 +02:00
|
|
|
From: Andreas Schwab <schwab@linux-m68k.org>
|
|
|
|
Date: Thu, 8 Sep 2016 11:21:05 +0200
|
|
|
|
Subject: [PATCH] linux-user: properly test for infinite timeout in poll (#8)
|
|
|
|
|
|
|
|
After "linux-user: use target_ulong" the poll syscall was no longer
|
|
|
|
handling infinite timeout.
|
|
|
|
|
|
|
|
/home/abuild/rpmbuild/BUILD/qemu-2.7.0-rc5/linux-user/syscall.c:9773:26: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
|
|
|
|
if (arg3 >= 0) {
|
|
|
|
^~
|
|
|
|
|
|
|
|
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
|
|
|
---
|
|
|
|
linux-user/syscall.c | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
2017-03-29 06:22:10 +02:00
|
|
|
index 71d4f06..78f0ea4 100644
|
2016-09-19 19:06:58 +02:00
|
|
|
--- a/linux-user/syscall.c
|
|
|
|
+++ b/linux-user/syscall.c
|
2017-03-29 06:22:10 +02:00
|
|
|
@@ -10204,7 +10204,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1,
|
2016-09-19 19:06:58 +02:00
|
|
|
{
|
|
|
|
struct timespec ts, *pts;
|
|
|
|
|
|
|
|
- if (arg3 >= 0) {
|
|
|
|
+ if ((abi_long)arg3 >= 0) {
|
|
|
|
/* Convert ms to secs, ns */
|
|
|
|
ts.tv_sec = arg3 / 1000;
|
|
|
|
ts.tv_nsec = (arg3 % 1000) * 1000000LL;
|