mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-20 05:01:50 +02:00
39 lines
961 B
Diff
39 lines
961 B
Diff
--- 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.
|