summaryrefslogtreecommitdiffstats
path: root/src/serviceframework
diff options
context:
space:
mode:
authorAndrew Stanley-Jones <andrew.stanley-jones@nokia.com>2012-07-02 16:58:33 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-02 09:24:20 +0200
commit11bd8d3fa7b4be26af8a071260fa77d756a3d14f (patch)
treeb1bf2968060984c28035b5c47105f4c59d1bc0d9 /src/serviceframework
parent4b30b7e6e2ae2ad13f3566bdc463f319b8456e5e (diff)
Fix select on OSX
OSX does not allow the timeval.tv_usec to be greater than 1 million (1 second), so split the value between the usec path and the second field. Change-Id: I926c360aa91e5d5131e6b7099df808f29ac3c56a Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'src/serviceframework')
-rw-r--r--src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp b/src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp
index 75654606..01de10e3 100644
--- a/src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp
+++ b/src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp
@@ -405,7 +405,9 @@ int UnixEndPoint::runLocalEventLoop(int msec) {
}
tv.tv_usec = msec*1000;
- tv.tv_sec = 0;
+ // OSX does not support usec > 1 million
+ tv.tv_sec = tv.tv_usec%1000000;
+ tv.tv_usec /= 1000000;
// QServiceDebugLog::instance()->appendToLog(QStringLiteral("<!> select"));