[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kjs] src/kjs: Fix compilation on Mac OS X
From: Harald Fernengel <harryf () gmx ! com>
Date: 2014-02-05 20:37:55
Message-ID: E1WB9EJ-0005qf-4Z () scm ! kde ! org
[Download RAW message or body]
Git commit cf2904f45d9a01ecd677416eda9848315afbd3c4 by Harald Fernengel.
Committed on 05/02/2014 at 20:36.
Pushed by harald into branch 'master'.
Fix compilation on Mac OS X
Seems that clang on OSX is a bit stricter with struct timerval,
didn't like the long value there. Explicitly cast to make it compile.
Reviewed By Bernd Buschinski
M +4 -2 src/kjs/interpreter.cpp
http://commits.kde.org/kjs/cf2904f45d9a01ecd677416eda9848315afbd3c4
diff --git a/src/kjs/interpreter.cpp b/src/kjs/interpreter.cpp
index e699651..e4f97f6 100644
--- a/src/kjs/interpreter.cpp
+++ b/src/kjs/interpreter.cpp
@@ -113,8 +113,10 @@ void TimeoutChecker::startTimeoutCheck(Interpreter *interpreter)
s_executingInterpreter = interpreter;
itimerval tv = {
- { interpreter->m_timeoutTime / 1000, (interpreter->m_timeoutTime % 1000) * 1000 },
- { interpreter->m_timeoutTime / 1000, (interpreter->m_timeoutTime % 1000) * 1000 }
+ { time_t(interpreter->m_timeoutTime / 1000),
+ suseconds_t((interpreter->m_timeoutTime % 1000) * 1000) },
+ { time_t(interpreter->m_timeoutTime / 1000),
+ suseconds_t((interpreter->m_timeoutTime % 1000) * 1000) }
};
setitimer(ITIMER_REAL, &tv, &m_oldtv);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic