Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 1 | From 23c67e93e51f700d0aeecfc08277e39f51201fc3 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 2 Sep 2022 12:59:46 -0700 |
| 4 | Subject: [PATCH] gphoto2: Use pthread_t abstract type for thead IDs |
| 5 | |
| 6 | This is not a plain old datatype in every libc, e.g. with musl this |
| 7 | would fail in type conversion |
| 8 | |
| 9 | Upstream-Status: Submitted [https://github.com/gphoto/gphoto2/pull/535] |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | --- |
| 12 | gphoto2/main.c | 4 ++-- |
| 13 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 14 | |
| 15 | diff --git a/gphoto2/main.c b/gphoto2/main.c |
| 16 | index 2bf5964..9a6b05d 100644 |
| 17 | --- a/gphoto2/main.c |
| 18 | +++ b/gphoto2/main.c |
| 19 | @@ -1198,7 +1198,7 @@ thread_func (void *data) |
| 20 | pthread_cleanup_pop (1); |
| 21 | } |
| 22 | |
| 23 | -static unsigned int |
| 24 | +static pthread_t |
| 25 | start_timeout_func (Camera *camera, unsigned int timeout, |
| 26 | CameraTimeoutFunc func, void __unused__ *data) |
| 27 | { |
| 28 | @@ -1219,7 +1219,7 @@ start_timeout_func (Camera *camera, unsigned int timeout, |
| 29 | } |
| 30 | |
| 31 | static void |
| 32 | -stop_timeout_func (Camera __unused__ *camera, unsigned int id, |
| 33 | +stop_timeout_func (Camera __unused__ *camera, pthread_t id, |
| 34 | void __unused__ *data) |
| 35 | { |
| 36 | pthread_t tid = id; |
| 37 | -- |
| 38 | 2.37.3 |
| 39 | |