summaryrefslogtreecommitdiffstats
path: root/package/linknx
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-08-20 12:15:26 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-08-20 12:15:26 +0200
commit780a88bc97294575c23c4f17513009d84c1bb4d2 (patch)
tree760e9a7a53887a22c0a5d9a0a48fd06e76ffd376 /package/linknx
parent0d8a05c38e58b4c9240e882e0184bc10ec4f6eb4 (diff)
downloadbuildroot-780a88bc97294575c23c4f17513009d84c1bb4d2.tar.gz
buildroot-780a88bc97294575c23c4f17513009d84c1bb4d2.zip
linknx: fix build with gcc 6.x
Add a patch to fix the build of linknx with gcc 6.x. Fixes: http://autobuild.buildroot.net/results/32e375e3f254ac19bed54a9e9fd6c1e9048e2043/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/linknx')
-rw-r--r--package/linknx/0002-src-suncalc.cpp-fix-build-with-gcc-6.x.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/package/linknx/0002-src-suncalc.cpp-fix-build-with-gcc-6.x.patch b/package/linknx/0002-src-suncalc.cpp-fix-build-with-gcc-6.x.patch
new file mode 100644
index 0000000000..d204a02269
--- /dev/null
+++ b/package/linknx/0002-src-suncalc.cpp-fix-build-with-gcc-6.x.patch
@@ -0,0 +1,42 @@
+From ff52cf04c6fa8b3352544447abf429bfa6000dc8 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sat, 20 Aug 2016 12:13:04 +0200
+Subject: [PATCH] src/suncalc.cpp: fix build with gcc 6.x
+
+src/suncalc.cpp currently includes <math.h>, but this causes a build
+failure with gcc 6.x, and <cmath> should be used instead. The build
+failure is:
+
+/home/test/autobuild/run/instance-0/output/host/usr/arc-buildroot-linux-uclibc/include/c++/6.1.1/cmath:101:37: error: '__is_integer' was not declared in this scope
+ typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ ^~~~~~~~~~~~
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/suncalc.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/suncalc.cpp b/src/suncalc.cpp
+index ea2366a..b553f96 100644
+--- a/src/suncalc.cpp
++++ b/src/suncalc.cpp
+@@ -22,6 +22,8 @@
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <cmath>
++
+ #include "suncalc.h"
+ #include "services.h"
+
+@@ -44,7 +46,6 @@ Released to the public domain by Paul Schlyter, December 1992
+
+
+ #include <stdio.h>
+-#include <math.h>
+ #include <time.h>
+ #include <stdlib.h>
+ #include <getopt.h>
+--
+2.7.4
+
OpenPOWER on IntegriCloud