blob: e57d6dd5f0594ec4b5c67ffb83f1488be1b40949 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--- vlc-2.0.0-rc1.orig/src/posix/linux_specific.c
+++ vlc-2.0.0-rc1/src/posix/linux_specific.c
@@ -83,14 +83,14 @@
unsigned refs;
} once = { VLC_STATIC_MUTEX, 0 };
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
# include <gnu/libc-version.h>
# include <stdlib.h>
#endif
void system_Init (void)
{
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
const char *glcv = gnu_get_libc_version ();
/* gettext in glibc 2.5-2.7 is not thread-safe. LibVLC keeps crashing,
--- vlc-2.0.0-rc1.orig/src/posix/thread.c
+++ vlc-2.0.0-rc1/src/posix/thread.c
@@ -1165,6 +1165,16 @@
return vlc_atomic_swap (&timer->overruns, 0);
}
+#if defined(HAVE_SCHED_GETAFFINITY) && !defined(CPU_COUNT)
+static unsigned CPU_COUNT(cpu_set_t *cpu)
+{
+ unsigned i, count = 0;
+ for (i = 0; i < CPU_SETSIZE; i++)
+ if (CPU_ISSET(i, cpu))
+ count++;
+ return count;
+}
+#endif
/**
* Count CPUs.
|