      led_ie.code = led;
      led_ie.value = state;
 diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
-index f86f80785e..3914698f2a 100644
+index c51db59e1f..1f3726e291 100644
 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
 +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
-@@ -568,7 +568,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
+@@ -58,6 +58,11 @@
+ #include <linux/input.h>
+ #endif
+ 
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ #include <math.h>
+ 
+ #if QT_CONFIG(mtdev)
+@@ -576,7 +581,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
  
          // update timestamps
          m_lastTimeStamp = m_timeStamp;

 QT_BEGIN_NAMESPACE
 
 Q_LOGGING_CATEGORY(qLcEvdevKey, "qt.qpa.input")
@@ -149,7 +154,10 @@ void QEvdevKeyboardHandler::switchLed(int led, bool state)
     qCDebug(qLcEvdevKey) << "switchLed" << led << state;
 
     struct ::input_event led_ie;
-    ::gettimeofday(&led_ie.time, 0);

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../input/evdevkeyboard/qevdevkeyboardhandler.cpp      | 10 +++++++++-
 .../input/evdevtouch/qevdevtouchhandler.cpp            |  7 ++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
index 3555763b89..e7dc57c027 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
@@ -58,6 +58,11 @@
