Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Feb 2023 09:08:07 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3508b155e60b - main - graphics/gphoto2: fix the port's build against modern Clang 15
Message-ID:  <202302150908.31F987xQ047112@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3508b155e60b6505f54262b1deb202dfef35aab1

commit 3508b155e60b6505f54262b1deb202dfef35aab1
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-02-15 09:07:12 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-02-15 09:07:12 +0000

    graphics/gphoto2: fix the port's build against modern Clang 15
    
    Cast `unsigned int' type properly when using it as a thread id.
    
    Reported by:    pkg-fallout
---
 graphics/gphoto2/files/patch-gphoto2_main.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/graphics/gphoto2/files/patch-gphoto2_main.c b/graphics/gphoto2/files/patch-gphoto2_main.c
new file mode 100644
index 000000000000..aba416d2d3a7
--- /dev/null
+++ b/graphics/gphoto2/files/patch-gphoto2_main.c
@@ -0,0 +1,19 @@
+--- gphoto2/main.c.orig	2020-07-02 06:39:33 UTC
++++ gphoto2/main.c
+@@ -1211,14 +1211,14 @@ start_timeout_func (Camera *camera, unsigned int timeo
+ 
+ 	pthread_create (&tid, NULL, thread_func, td);
+ 
+-	return (tid);
++	return (intptr_t)tid;
+ }
+ 
+ static void
+ stop_timeout_func (Camera __unused__ *camera, unsigned int id,
+ 		   void __unused__ *data)
+ {
+-	pthread_t tid = id;
++	pthread_t tid = (pthread_t)(intptr_t)id;
+ 
+ 	pthread_cancel (tid);
+ 	pthread_join (tid, NULL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302150908.31F987xQ047112>