--- guilib/common/Makefile.orig +++ guilib/common/Makefile @@ -4,8 +4,6 @@ INCLUDES=-I. -I../ -I../../xbmc -I../../ ifeq ($(findstring osx,$(ARCH)), osx) SRCS=SDLJoystick.cpp -else ifeq ($(findstring bsd,$(ARCH)), bsd) -SRCS=SDLJoystick.cpp else SRCS=SDLJoystick.cpp LIRC.cpp endif --- guilib/system.h.orig +++ guilib/system.h @@ -135,9 +135,7 @@ #define HAS_GLX #define HAS_LINUX_NETWORK #define HAS_SDL_AUDIO -#if !defined(__FreeBSD__) #define HAS_LIRC -#endif #define HAS_SDL_WIN_EVENTS #ifdef HAVE_LIBPULSE #define HAS_PULSEAUDIO --- configure.in.orig +++ configure.in @@ -516,7 +516,7 @@ AC_FUNC_STRFTIME AC_FUNC_STRTOD AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF -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]) +AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa inotify 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]) # Check for various sizes AC_CHECK_SIZEOF([int]) --- guilib/common/LIRC.cpp.orig +++ guilib/common/LIRC.cpp @@ -19,11 +19,14 @@ * */ +#include "config.h" #include #include #include #include +#ifdef HAVE_INOTIFY #include +#endif #include #include #include "LIRC.h" @@ -92,12 +95,14 @@ void CRemoteControl::Disconnect() close(m_fd); m_fd = -1; m_file = NULL; +#ifdef HAVE_INOTIFY if (m_inotify_wd >= 0) { inotify_rm_watch(m_inotify_fd, m_inotify_wd); m_inotify_wd = -1; } if (m_inotify_fd >= 0) close(m_inotify_fd); +#endif m_inReply = false; m_nrSending = 0; @@ -148,6 +153,7 @@ void CRemoteControl::Initialize() { if ((m_file = fdopen(m_fd, "r+")) != NULL) { +#ifdef HAVE_INOTIFY // Setup inotify so we can disconnect if lircd is restarted if ((m_inotify_fd = inotify_init()) >= 0) { @@ -168,6 +174,10 @@ void CRemoteControl::Initialize() } } } +#else + m_bInitialized = true; + CLog::Log(LOGINFO, "LIRC %s: sucessfully started", __FUNCTION__); +#endif } else CLog::Log(LOGERROR, "LIRC %s: fdopen failed: %s", __FUNCTION__, strerror(errno)); @@ -206,6 +216,7 @@ void CRemoteControl::Initialize() } bool CRemoteControl::CheckDevice() { +#ifdef HAVE_INOTIFY if (m_inotify_fd < 0 || m_inotify_wd < 0) return true; // inotify wasn't setup for some reason, assume all is well int bufsize = sizeof(struct inotify_event) + PATH_MAX; @@ -220,6 +231,7 @@ bool CRemoteControl::CheckDevice() { } i += sizeof(struct inotify_event)+e->len; } +#endif return true; }