ports/audio/deadbeef/files/patch-threading__pthread.c
Dimitry Andric eac5d2ab2c audio/deadbeef: fix build with clang 15
During an exp-run for llvm 15 (see bug 265425), it turned out that
audio/deadbeef failed to build with clang 15:

  threading_pthread.c:57:12: error: incompatible pointer to integer conversion returning 'pthread_t' (aka 'struct pthread *') from a function with result type 'intptr_t' (aka 'long') [-Wint-conversion]
      return tid;
             ^~~

This is because it is trying to implicitly convert a pthread_t into an
integer. Add a cast to suppress the warning.

PR:		268991
Approved by:	maintainer timeout (2 weeks)
MFH:		2023Q1
2023-02-07 21:05:36 +01:00

11 lines
308 B
C

--- threading_pthread.c.orig 2016-06-19 11:26:18 UTC
+++ threading_pthread.c
@@ -54,7 +54,7 @@ thread_start (void (*fn)(void *ctx), void *ctx) {
fprintf (stderr, "pthread_attr_destroy failed: %s\n", strerror (s));
return 0;
}
- return tid;
+ return (intptr_t)tid;
}
intptr_t