summaryrefslogtreecommitdiffstats
path: root/main/xbmc/xbmc-uclibc.patch
blob: 233770b77ddbe3c4d52363aec999d3debb6dc760 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- 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

--- ./configure.in.orig	2013-05-03 05:57:40.000000000 +0000
+++ ./configure.in	2013-07-08 07:42:11.960541402 +0000
@@ -556,11 +556,11 @@
      use_cpu="i686"
      ffmpeg_target_os=linux
      ;;
-  i*86*-linux-gnu*)
+  i*86*-linux-gnu*|i*86*-linux-uclibc*)
      ARCH="i486-linux"
      AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
      ;;
-  x86_64-*-linux-gnu*)
+  x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
      ARCH="x86_64-linux"
      AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
      ;;