• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/linknx/0001-src-suncalc.cpp-fix-build-with-gcc-6.x.patch
Bernd KuhlsBernd Kuhls committed b56083099f130 Jul 2017
Raw file
Source viewDiff to previous
 
1
From ff52cf04c6fa8b3352544447abf429bfa6000dc8 Mon Sep 17 00:00:00 2001
2
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3
Date: Sat, 20 Aug 2016 12:13:04 +0200
4
Subject: [PATCH] src/suncalc.cpp: fix build with gcc 6.x
5
​
6
src/suncalc.cpp currently includes <math.h>, but this causes a build
7
failure with gcc 6.x, and <cmath> should be used instead. The build
8
failure is:
9
​
10
/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
11
     typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
12
                                     ^~~~~~~~~~~~
13
​
14
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
15
---
16
 src/suncalc.cpp | 3 ++-
17
 1 file changed, 2 insertions(+), 1 deletion(-)
18
​
19
diff --git a/src/suncalc.cpp b/src/suncalc.cpp
20
index ea2366a..b553f96 100644
21
--- a/src/suncalc.cpp
22
+++ b/src/suncalc.cpp
23
@@ -22,6 +22,8 @@
24
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
 */
26
 
27
+#include <cmath>
28
+
29
 #include "suncalc.h"
30
 #include "services.h"
31
 
32
@@ -44,7 +46,6 @@ Released to the public domain by Paul Schlyter, December 1992
33
 
34
 
35
 #include <stdio.h>
36
-#include <math.h>
37
 #include <time.h>
38
 #include <stdlib.h>
39
 #include <getopt.h>
40
-- 
41
2.7.4
42
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.