Skip to content

Commit

Permalink
devel/py-llfuse: fix build with clang 15
Browse files Browse the repository at this point in the history
During an exp-run for llvm 15 (see bug 265425), it turned out that
devel/py-llfuse failed to build with clang 15:

  src/llfuse.c:41839:21: error: incompatible pointer to integer conversion assigning to 'uintptr_t' (aka 'unsigned int') from 'pthread_t' (aka 'struct pthread *') [-Wint-conversion]
          __pyx_v_tid = __pyx_t_7;
                      ^ ~~~~~~~~~
  src/llfuse.c:42467:3: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
    PyEval_InitThreads();
    ^
  /usr/local/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
  Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
  ^
  /usr/local/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  1 warning and 1 error generated.

The conversion from pthread_t to uintptr_t needs an explicit cast.

PR:		268226
Approved by:	maintainer timeout (2 weeks)
MFH:		2022Q4
  • Loading branch information
DimitryAndric committed Dec 25, 2022
1 parent b43593b commit df7a32d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions devel/py-llfuse/files/patch-src_llfuse.c
@@ -0,0 +1,11 @@
--- src/llfuse.c.orig 2022-05-31 15:39:27 UTC
+++ src/llfuse.c
@@ -41836,7 +41836,7 @@ static void *__pyx_f_6llfuse_worker_start(void *__pyx_
* 'aborting processing', tid)
*/
__pyx_t_7 = __pyx_v_wd->thread_id;
- __pyx_v_tid = __pyx_t_7;
+ __pyx_v_tid = (uintptr_t)__pyx_t_7;

/* "src/fuse_api.pxi":391
* fuse_session_exit(session)

0 comments on commit df7a32d

Please sign in to comment.