summaryrefslogtreecommitdiffstats
path: root/package/upmpdcli/upmpdcli-0001-uclibc-fixes.patch
blob: 4935efd8cbfb94c2b24e6a751a3e2ead5e8aef70 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Add necessary fixes to build with uClibc

 - Missing #include of C library headers
 - exp10 is not available in uClibc

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: b/libupnpp/device.cxx
===================================================================
--- a/libupnpp/device.cxx
+++ b/libupnpp/device.cxx
@@ -17,6 +17,7 @@
 #include "config.h"
 
 #include <time.h>
+#include <errno.h>
 #include <sys/time.h>
 
 #include <iostream>
Index: b/libupnpp/soaphelp.cxx
===================================================================
--- a/libupnpp/soaphelp.cxx
+++ b/libupnpp/soaphelp.cxx
@@ -16,6 +16,10 @@
  */
 #include "config.h"
 
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
 #include <iostream>
 using namespace std;
 
Index: b/upmpd/upmpd.cxx
===================================================================
--- a/upmpd/upmpd.cxx
+++ b/upmpd/upmpd.cxx
@@ -20,6 +20,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <pwd.h>
+#include <errno.h>
 
 #include <string>
 #include <iostream>
Index: b/upmpd/upmpdutils.cxx
===================================================================
--- a/upmpd/upmpdutils.cxx
+++ b/upmpd/upmpdutils.cxx
@@ -21,11 +21,14 @@
 // not linking to Qt or glib just to get path-concatenating
 // functions...
 
+#define _GNU_SOURCE
+
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/file.h>
+#include <stdlib.h>
 #include <math.h>
 #include <pwd.h>
 #include <regex.h>
@@ -35,6 +38,11 @@
 #define O_STREAMING 0
 #endif
 
+#ifdef __UCLIBC__
+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
+#define exp10(x) (exp((x) * log(10)))
+#endif /* __UCLIBC__ */
+
 #include <iostream>
 #include <sstream>
 #include <fstream>
OpenPOWER on IntegriCloud