aboutsummaryrefslogtreecommitdiffstats
path: root/iolooper-select.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-03-16 09:21:02 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-03-16 09:21:02 -0700
commit10bc04fd968d7f80258bf1eec665babf28e9e47d (patch)
tree30269c62a7f2d6658b6c6ebc2ad2fcf7c1d9ddb0 /iolooper-select.c
parentfacee1d1d0c3029915f5443c788cd32b9f5b9c83 (diff)
downloadexternal_qemu-10bc04fd968d7f80258bf1eec665babf28e9e47d.zip
external_qemu-10bc04fd968d7f80258bf1eec665babf28e9e47d.tar.gz
external_qemu-10bc04fd968d7f80258bf1eec665babf28e9e47d.tar.bz2
Fixes a hack that was enabling multi-touch emulation on Mac.
The issue was that on Mac there is a bug in select() implementation, that caused select() to fail with EINVAL on condition that timeout exceeds 100000000 secods. So the real fix was to clamp timout value to that limit when select() is called on Mac. Change-Id: Icb9ead00a0060028957af1e6e22911d5e8e231c6
Diffstat (limited to 'iolooper-select.c')
-rw-r--r--iolooper-select.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/iolooper-select.c b/iolooper-select.c
index 955204d..5024c9a 100644
--- a/iolooper-select.c
+++ b/iolooper-select.c
@@ -175,6 +175,8 @@ iolooper_wait( IoLooper* iol, int64_t duration )
if (count == 0)
return 0;
+ CLAMP_MAC_TIMEOUT(duration);
+
if (duration < 0)
tm = NULL;
else {