void-packages/srcpkgs/fingerprint-gui/patches/time64.patch

30 lines
936 B
Diff

Index: src/FingerprintHelper.cpp
===================================================================
--- a/src/FingerprintHelper.cpp
+++ b/src/FingerprintHelper.cpp
@@ -75,9 +75,12 @@ void pluginMessage(const char *msg){
// Send <enter> to uinput
bool uinputSendEnter(int uinput){
struct input_event event;
+ struct timeval tv = { 0, 0 };
memset(&event,0,sizeof(event));
// PRESS
- gettimeofday(&event.time,NULL);
+ gettimeofday(&tv,NULL);
+ event.input_event_sec = tv.tv_sec;
+ event.input_event_usec = tv.tv_usec;
event.type=EV_KEY;
event.code=KEY_ENTER;
event.value=1;
@@ -93,7 +96,9 @@ bool uinputSendEnter(int uinput){
return false;
}
// RELEASE
- gettimeofday(&event.time,NULL);
+ gettimeofday(&tv,NULL);
+ event.input_event_sec = tv.tv_sec;
+ event.input_event_usec = tv.tv_usec;
event.type=EV_KEY;
event.code=KEY_ENTER;
event.value=0;