package/x11r7/xdriver_xf86-video-openchrome: bump version to 0.5.0
[buildroot-gz.git] / package / kodi / 0003-ALSA-fix-device-change-event-support.patch
blobb5f37b94daa69df12d9c2424f6476bc6784f11b0
1 Patch sent upstream:
3 https://github.com/xbmc/xbmc/pull/7551
6 From a6d6a1a36ff2dff2586fbad2a068e7df14b55fdc Mon Sep 17 00:00:00 2001
7 From: Bernd Kuhls <bernd.kuhls@t-online.de>
8 Date: Sun, 19 Jul 2015 14:12:03 +0200
9 Subject: [PATCH 1/1] ALSA: fix device change event support
11 Current uClibc version 0.9.33.2 does not support eventfd_read/write.
13 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
14 ---
15 configure.ac | 5 ++++-
16 xbmc/linux/FDEventMonitor.cpp | 12 ++++++++++++
17 2 files changed, 16 insertions(+), 1 deletion(-)
19 diff --git a/configure.ac b/configure.ac
20 index d321f7d..4c6c750 100644
21 --- a/configure.ac
22 +++ b/configure.ac
23 @@ -911,7 +911,7 @@ AC_FUNC_STRFTIME
24 AC_FUNC_STRTOD
25 AC_FUNC_UTIME_NULL
26 AC_FUNC_VPRINTF
27 -AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa lchown localeconv memchr memmove memset mkdir modf munmap pow rmdir select setenv setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strspn strstr strtol strtoul sysinfo tzset utime posix_fadvise localtime_r])
28 +AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa lchown localeconv memchr memmove memset mkdir modf munmap pow rmdir select setenv setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strspn strstr strtol strtoul sysinfo tzset utime posix_fadvise localtime_r eventfd_read eventfd_write])
30 # Check for various sizes
31 AC_CHECK_SIZEOF([int])
32 @@ -2064,6 +2064,9 @@ fi
33 if test "$use_alsa" = "yes"; then
34 USE_ALSA=1
35 AC_DEFINE([USE_ALSA],[1],["Define to 1 if alsa is installed"])
36 + if test "$ac_cv_func_eventfd_read" = "yes" -a "$ac_cv_func_eventfd_write" = "yes"; then
37 + AC_DEFINE([HAVE_EVENTFD],[1],["Define to 1 if eventfd is installed"])
38 + fi
39 final_message="$final_message\n ALSA:\t\tYes"
40 else
41 USE_ALSA=0
42 diff --git a/xbmc/linux/FDEventMonitor.cpp b/xbmc/linux/FDEventMonitor.cpp
43 index 4a41477..84efeb9 100644
44 --- a/xbmc/linux/FDEventMonitor.cpp
45 +++ b/xbmc/linux/FDEventMonitor.cpp
46 @@ -28,6 +28,18 @@
48 #include "FDEventMonitor.h"
50 +#ifndef HAVE_EVENTFD
51 +static int eventfd_read(int __fd, eventfd_t *__value)
53 + return read(__fd, __value, sizeof(eventfd_t)) == sizeof(eventfd_t) ? 0 : -1;
56 +static int eventfd_write(int __fd, eventfd_t __value)
58 + return write(__fd, &__value, sizeof(eventfd_t)) == sizeof(eventfd_t) ? 0 : -1;
60 +#endif
62 CFDEventMonitor::CFDEventMonitor() :
63 CThread("FDEventMonitor"),
64 m_nextID(0),
65 --
66 1.7.10.4