diff options
| -rw-r--r-- | meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch | 50 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch b/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch new file mode 100644 index 0000000000..abe38e12ce --- /dev/null +++ b/meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From 366930ccc1a261c3eb883da2bf3c655162ccd75f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 1 Mar 2023 22:58:37 -0800 | ||
| 4 | Subject: [PATCH] Match prototypes of callbacks with libgphoto | ||
| 5 | |||
| 6 | In https://github.com/gphoto/gphoto2/pull/535/commits/ccc4c1f092bd21ebc713f4d7b9be85be49f92f1e | ||
| 7 | we tried to fix by using pthread_t but it also needs to make changes in | ||
| 8 | libgphoto and these changes can be invasive, therefore lets revert to | ||
| 9 | older types and to fix musl problem fix it via type casts | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [https://github.com/gphoto/gphoto2/pull/569] | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | gphoto2/main.c | 8 ++++---- | ||
| 15 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/gphoto2/main.c b/gphoto2/main.c | ||
| 18 | index 0dac947..cd3c990 100644 | ||
| 19 | --- a/gphoto2/main.c | ||
| 20 | +++ b/gphoto2/main.c | ||
| 21 | @@ -1198,7 +1198,7 @@ thread_func (void *data) | ||
| 22 | pthread_cleanup_pop (1); | ||
| 23 | } | ||
| 24 | |||
| 25 | -static pthread_t | ||
| 26 | +static unsigned int | ||
| 27 | start_timeout_func (Camera *camera, unsigned int timeout, | ||
| 28 | CameraTimeoutFunc func, void __unused__ *data) | ||
| 29 | { | ||
| 30 | @@ -1215,14 +1215,14 @@ start_timeout_func (Camera *camera, unsigned int timeout, | ||
| 31 | |||
| 32 | pthread_create (&tid, NULL, thread_func, td); | ||
| 33 | |||
| 34 | - return (tid); | ||
| 35 | + return (unsigned int)tid; | ||
| 36 | } | ||
| 37 | |||
| 38 | static void | ||
| 39 | -stop_timeout_func (Camera __unused__ *camera, pthread_t id, | ||
| 40 | +stop_timeout_func (Camera __unused__ *camera, unsigned int id, | ||
| 41 | void __unused__ *data) | ||
| 42 | { | ||
| 43 | - pthread_t tid = id; | ||
| 44 | + pthread_t tid = (pthread_t)id; | ||
| 45 | |||
| 46 | pthread_cancel (tid); | ||
| 47 | pthread_join (tid, NULL); | ||
| 48 | -- | ||
| 49 | 2.39.2 | ||
| 50 | |||
diff --git a/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb b/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb index fe33940475..513845194d 100644 --- a/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb +++ b/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb | |||
| @@ -9,6 +9,7 @@ RDEPENDS:gphoto2 = "libgphoto2" | |||
| 9 | SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/gphoto2-${PV}.tar.bz2;name=gphoto2 \ | 9 | SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/gphoto2-${PV}.tar.bz2;name=gphoto2 \ |
| 10 | file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \ | 10 | file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \ |
| 11 | file://0001-gphoto2-Use-pthread_t-abstract-type-for-thead-IDs.patch \ | 11 | file://0001-gphoto2-Use-pthread_t-abstract-type-for-thead-IDs.patch \ |
| 12 | file://0001-Match-prototypes-of-callbacks-with-libgphoto.patch \ | ||
| 12 | " | 13 | " |
| 13 | SRC_URI[gphoto2.sha256sum] = "2a648dcdf12da19e208255df4ebed3e7d2a02f905be4165f2443c984cf887375" | 14 | SRC_URI[gphoto2.sha256sum] = "2a648dcdf12da19e208255df4ebed3e7d2a02f905be4165f2443c984cf887375" |
| 14 | 15 | ||
