From 141482bb6eea76e361b0c6a64dd99551d43319f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Tue, 8 Jan 2013 16:01:40 +0200 Subject: Add struct keyword for timeval variable to remove ambiguity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VxWorks does not have gettimeofday function, so make sure we pick correct definition for timeval. This is not needed in Qt5, because there is already struct keyword used for timeval variable. Change-Id: Iedb47e7c50610f64b0178527127fc003ee67ff4a Reviewed-by: Thiago Macieira Reviewed-by: Samuel Rødal --- src/corelib/tools/qelapsedtimer_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp index f87c8ca..cad0081 100644 --- a/src/corelib/tools/qelapsedtimer_unix.cpp +++ b/src/corelib/tools/qelapsedtimer_unix.cpp @@ -127,7 +127,7 @@ static inline void do_gettime(qint64 *sec, qint64 *frac) } #endif // use gettimeofday - timeval tv; + struct timeval tv; ::gettimeofday(&tv, 0); *sec = tv.tv_sec; *frac = tv.tv_usec; -- cgit v0.12