aboutsummaryrefslogtreecommitdiffstats
path: root/main/xbmc/xbmc-uclibc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/xbmc/xbmc-uclibc.patch')
-rw-r--r--main/xbmc/xbmc-uclibc.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/xbmc/xbmc-uclibc.patch b/main/xbmc/xbmc-uclibc.patch
new file mode 100644
index 0000000000..5ea62c200d
--- /dev/null
+++ b/main/xbmc/xbmc-uclibc.patch
@@ -0,0 +1,41 @@
+--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h.orig
++++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
+@@ -27,8 +27,10 @@
+ #include "system.h"
+ #include "threads/CriticalSection.h"
+
+-#if defined(_LINUX) && !defined(TARGET_DARWIN) && !defined(__FreeBSD__) && !defined(__ANDROID__)
++#if defined(_LINUX) && !defined(TARGET_DARWIN) && !defined(__FreeBSD__) && !defined(__ANDROID__) && !defined(__UCLIBC__)
+ #define _file _fileno
++#elif defined(__UCLIBC__)
++#define _file __filedes
+ #endif
+
+ #define MAX_EMULATED_FILES 50
+--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h.orig
++++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
+@@ -46,9 +46,9 @@
+
+ typedef void ( *PFV)(void);
+
+-#define __IS_STDIN_STREAM(stream) (stream == stdin || stream->_file == stdin->_file || stream->_file == 0)
+-#define __IS_STDOUT_STREAM(stream) (stream == stdout || stream->_file == stdout->_file || stream->_file == 1)
+-#define __IS_STDERR_STREAM(stream) (stream == stderr || stream->_file == stderr->_file || stream->_file == 2)
++#define __IS_STDIN_STREAM(stream) (stream == stdin || fileno(stream) == fileno(stdin) || fileno(stream) == 0)
++#define __IS_STDOUT_STREAM(stream) (stream == stdout || fileno(stream) == fileno(stdout) || fileno(stream) == 1)
++#define __IS_STDERR_STREAM(stream) (stream == stderr || fileno(stream) == fileno(stderr) || fileno(stream) == 2)
+ #define IS_STDIN_STREAM(stream) (stream != NULL && __IS_STDIN_STREAM(stream))
+ #define IS_STDOUT_STREAM(stream) (stream != NULL && __IS_STDOUT_STREAM(stream))
+ #define IS_STDERR_STREAM(stream) (stream != NULL && __IS_STDERR_STREAM(stream))
+--- a/xbmc/visualizations/XBMCProjectM/libprojectM/BeatDetect.cpp.orig
++++ b/xbmc/visualizations/XBMCProjectM/libprojectM/BeatDetect.cpp
+@@ -33,7 +33,7 @@
+
+ #include "Common.hpp"
+ #include "PCM.hpp"
+-#include <cmath>
++#include "math.h"
+ #include "BeatDetect.hpp"
+
+ #ifdef _WIN32
+