summaryrefslogtreecommitdiffstats
path: root/main/xbmc/xbmc-uclibc.patch
blob: 5ea62c200d9c35dae3d2b229010fe5a1fa39c297 (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
39
40
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