be47b84c1a
Add missing header file <cstdio> to the uclibc patch to fix build with target SH4. Fixes: http://autobuild.buildroot.net/results/e5be8fe46a30f0b417fe5fc19a27c480d885791e/ http://autobuild.buildroot.net/results/a3453afddff4fc03681f7fbdff3ccab9706eb189/ [Thomas: further improve the patch by adding a missing <errno.h> include.] Signed-off-by: Jörg Krause <jkrause@posteo.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
160 lines
4.3 KiB
Diff
160 lines
4.3 KiB
Diff
From 722ffb8612631b9f11d888c737facdcb0580aaad Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <jkrause@posteo.de>
|
|
Date: Wed, 1 Oct 2014 22:31:11 +0200
|
|
Subject: [PATCH 1/1] uclibc fixes
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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>
|
|
Signed-off-by: Jörg Krause <jkrause@posteo.de>
|
|
---
|
|
libupnpp/control/avtransport.cxx | 2 ++
|
|
libupnpp/control/ohplaylist.cxx | 1 +
|
|
libupnpp/control/renderingcontrol.cxx | 2 ++
|
|
libupnpp/device/device.cxx | 1 +
|
|
libupnpp/soaphelp.cxx | 4 ++++
|
|
libupnpp/upnpavutils.cxx | 1 +
|
|
upmpd/upmpd.cxx | 1 +
|
|
upmpd/upmpdutils.cxx | 7 +++++++
|
|
8 files changed, 19 insertions(+)
|
|
|
|
Index: b/libupnpp/control/avtransport.cxx
|
|
===================================================================
|
|
--- a/libupnpp/control/avtransport.cxx
|
|
+++ b/libupnpp/control/avtransport.cxx
|
|
@@ -15,6 +15,8 @@
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include <stdlib.h>
|
|
+
|
|
#include <string>
|
|
#include <functional>
|
|
|
|
Index: b/libupnpp/control/ohplaylist.cxx
|
|
===================================================================
|
|
--- a/libupnpp/control/ohplaylist.cxx
|
|
+++ b/libupnpp/control/ohplaylist.cxx
|
|
@@ -14,6 +14,7 @@
|
|
* Free Software Foundation, Inc.,
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
+#include <stdlib.h>
|
|
#include <arpa/inet.h>
|
|
|
|
#include <string>
|
|
Index: b/libupnpp/control/renderingcontrol.cxx
|
|
===================================================================
|
|
--- a/libupnpp/control/renderingcontrol.cxx
|
|
+++ b/libupnpp/control/renderingcontrol.cxx
|
|
@@ -15,6 +15,8 @@
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include <stdlib.h>
|
|
+
|
|
#include <string>
|
|
#include <functional>
|
|
|
|
Index: b/libupnpp/device/device.cxx
|
|
===================================================================
|
|
--- a/libupnpp/device/device.cxx
|
|
+++ b/libupnpp/device/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/libupnpp/upnpavutils.cxx
|
|
===================================================================
|
|
--- a/libupnpp/upnpavutils.cxx
|
|
+++ b/libupnpp/upnpavutils.cxx
|
|
@@ -14,6 +14,7 @@
|
|
* Free Software Foundation, Inc.,
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
+#include <cstdio>
|
|
#include <string>
|
|
using namespace std;
|
|
|
|
Index: b/upmpd/upmpd.cxx
|
|
===================================================================
|
|
--- a/upmpd/upmpd.cxx
|
|
+++ b/upmpd/upmpd.cxx
|
|
@@ -22,6 +22,7 @@
|
|
#include <signal.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,6 +21,8 @@
|
|
// 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>
|
|
@@ -31,6 +33,7 @@
|
|
#include <regex.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
+#include <stdlib.h>
|
|
#ifndef O_STREAMING
|
|
#define O_STREAMING 0
|
|
#endif
|
|
@@ -283,6 +286,10 @@
|
|
#ifdef __APPLE__
|
|
#define exp10 __exp10
|
|
#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__ */
|
|
|
|
// Translate VolumeDB to MPD 0-100
|
|
int dbvaluetopercent(int dbvalue)
|
|
Index: b/upmpd/ohmetacache.cxx
|
|
===================================================================
|
|
--- a/upmpd/ohmetacache.cxx
|
|
+++ b/upmpd/ohmetacache.cxx
|
|
@@ -18,6 +18,7 @@
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
#include <string.h>
|
|
+#include <errno.h>
|
|
|
|
#include <iostream>
|
|
using namespace std;
|