kumquat-buildroot/package/upmpdcli/upmpdcli-0001-uclibc-fixes.patch
Joerg Krause 6038144652 upmpdcli: new package
[Thomas:
 - add package to package/Config.in
 - add missing dependencies on thread and largefile, inherited from
   libupnp. Noticed by Yann E. Morin.
 - add installation of default configuration file. Noticed by Yann
   E. Morin.
 - fix the license, it's not GPLv2, but GPLv2+.
 - remove the colon in the user description, noticed by Yann E. Morin.
 - added a patch to fix build with uClibc.
 - fix the init script installation to use a full path as the target.]

Signed-off-by: Joerg Krause <jkrause@posteo.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-16 20:31:27 +02:00

78 lines
1.7 KiB
Diff

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>