Package: glib2.0 / 2.42.1-1

11_kfreebsd_pthread_condattr_setclock_prototype.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Author: Emilio Pozuelo Monfort <pochu@debian.org>

Add a prototype for pthread_condattr_setclock() when building
on kFreeBSD since the prototype there is missing. The glibc bug
to add the missing prototype is http://bugs.debian.org/703545,
we can remove this hack when that is fixed.

Index: b/glib/gthread-posix.c
===================================================================
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -642,6 +642,12 @@
 
 #if !defined(USE_NATIVE_MUTEX)
 
+#if defined (HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined (CLOCK_MONOTONIC) && defined (__FreeBSD_kernel__)
+extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
+                                      __clockid_t __clock_id)
+     __THROW __nonnull ((1));
+#endif
+
 static pthread_cond_t *
 g_cond_impl_new (void)
 {