diff options
author | Pablo Saavedra <psaavedra@igalia.com> | 2024-11-18 20:35:20 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-11-19 17:04:22 -0800 |
commit | afd72775425ce9e413e47a3960b5a469381ae0e4 (patch) | |
tree | a10ba20f02098ab3e8a8219754bbec83981eaf32 /meta-python/recipes-devtools/python/python3-uinput | |
parent | a7165a0e4805a288a0d9bc5eef881fffe639f131 (diff) | |
download | meta-openembedded-afd72775425ce9e413e47a3960b5a469381ae0e4.tar.gz |
python3-uinput: Re-add recipe
- Added `python3-uinput_1.0.1.bb` recipe for the Python interface to
the Linux uinput kernel module.
- Included a submitted patch to handle 64-bit `time_t` on 32-bit
architectures to address Y2K38 issues in recent kernels and libcs.
Removed in b4efcecc63c86f3e7fa9d5c6205f1bd07d951fed for lack of
maintenance the situation change. There is a new release from 2024
March what addresses the build issues reported lately.
Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-uinput')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-uinput/0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-uinput/0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch b/meta-python/recipes-devtools/python/python3-uinput/0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch new file mode 100644 index 0000000000..8658c83f82 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-uinput/0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 84d40417fcf58ed123cd0040e5e5678ec12e68b2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 28 May 2022 15:50:50 -0700 | ||
4 | Subject: [PATCH] Deal with 64bit time_t default on 32bit architectures | ||
5 | |||
6 | Deal with Y2K38 concerns related to Linux input events on more recent | ||
7 | kernels and libcs on 32-bit systems | ||
8 | |||
9 | Original-Author: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | Signed-off-by: Pablo Saavedra <psaavedra@igalia.com> | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/pyinput/python-uinput/pull/2] | ||
15 | |||
16 | --- | ||
17 | libsuinput/src/suinput.c | 11 ++++++++++- | ||
18 | 1 file changed, 10 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/libsuinput/src/suinput.c b/libsuinput/src/suinput.c | ||
21 | index 8d5fb71..13ff16a 100644 | ||
22 | --- a/libsuinput/src/suinput.c | ||
23 | +++ b/libsuinput/src/suinput.c | ||
24 | @@ -45,11 +45,20 @@ int suinput_emit(int uinput_fd, uint16_t ev_type, uint16_t ev_code, | ||
25 | struct input_event event; | ||
26 | |||
27 | memset(&event, 0, sizeof(event)); | ||
28 | - gettimeofday(&event.time, 0); | ||
29 | event.type = ev_type; | ||
30 | event.code = ev_code; | ||
31 | event.value = ev_value; | ||
32 | |||
33 | +/* attempt to deal with 64-bit time keeping on recent 32-bit systems */ | ||
34 | +#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) | ||
35 | + gettimeofday(&event.time, 0); | ||
36 | +#else | ||
37 | + struct timeval now; | ||
38 | + memset(&now, 0, sizeof(now)); | ||
39 | + gettimeofday(&now, 0); | ||
40 | + event.input_event_sec = now.tv_sec; | ||
41 | + event.input_event_usec = now.tv_usec; | ||
42 | +#endif | ||
43 | return suinput_write_event(uinput_fd, &event); | ||
44 | } | ||
45 | |||
46 | -- | ||
47 | 2.34.1 | ||
48 | |||