diff options
author | tobik <tobik@FreeBSD.org> | 2018-09-09 15:10:25 +0800 |
---|---|---|
committer | tobik <tobik@FreeBSD.org> | 2018-09-09 15:10:25 +0800 |
commit | 351f5745ed4091b2d6c07a0cf6c5eeee1c3e9f61 (patch) | |
tree | bc9f461e38f14a49c3359d9bed86e4141c1c5ab8 /net | |
parent | c95e3fffd26e3b8bc764ba1980604ddc377f2a77 (diff) | |
download | freebsd-ports-gnome-351f5745ed4091b2d6c07a0cf6c5eeee1c3e9f61.tar.gz freebsd-ports-gnome-351f5745ed4091b2d6c07a0cf6c5eeee1c3e9f61.tar.zst freebsd-ports-gnome-351f5745ed4091b2d6c07a0cf6c5eeee1c3e9f61.zip |
net/linknx: Fix build with Clang 6
objectcontroller.cpp:659:27: error: non-constant-expression cannot be narrowed from type 'int' to 'uint8_t' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
uint8_t buf[2] = { 0, (isWrite ? 0x80 : 0x40) | (getBoolObjectValue() ? 1 : 0) };
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://beefy12.nyi.freebsd.org/data/head-amd64-default/p479076_s338486/logs/errors/linknx-0.0.1.32.log
PR: 230897
Submitted by: tobik
Approved by: bkoenig@alpha-tierchen.de (maintainer timeout, 2 weeks)
Diffstat (limited to 'net')
-rw-r--r-- | net/linknx/Makefile | 4 | ||||
-rw-r--r-- | net/linknx/files/patch-src_suncalc.cpp | 27 |
2 files changed, 30 insertions, 1 deletions
diff --git a/net/linknx/Makefile b/net/linknx/Makefile index 71fd9e0d60a9..a2a13425d3d3 100644 --- a/net/linknx/Makefile +++ b/net/linknx/Makefile @@ -20,10 +20,12 @@ BROKEN_armv7= fails to configure: checking for GNU Pth... Segmentation fault BROKEN_mips= fails to configure: checking for GNU Pth... Segmentation fault BROKEN_mips64= fails to configure: checking for GNU Pth... Segmentation fault -USES= gmake autoreconf pkgconfig +USES= compiler gmake autoreconf pkgconfig GNU_CONFIGURE= yes CONFIGURE_ARGS+=CFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-I${LOCALBASE}/include -L/${LOCALBASE}/lib" +CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}} +CXXFLAGS_clang= -Wno-c++11-narrowing OPTIONS_DEFINE= LIBESMTP LIBCURL LIBLUA MYSQL OPTIONS_DEFAULT= LIBESMTP diff --git a/net/linknx/files/patch-src_suncalc.cpp b/net/linknx/files/patch-src_suncalc.cpp new file mode 100644 index 000000000000..5c7a8fa3c1cf --- /dev/null +++ b/net/linknx/files/patch-src_suncalc.cpp @@ -0,0 +1,27 @@ +In file included from suncalc.cpp:47: + /usr/include/c++/v1/math.h:733:39: error: no member named 'fabsf' in the global + namespace; did you mean simply 'fabsf'? + abs(float __lcpp_x) _NOEXCEPT {return ::fabsf(__lcpp_x);} + ^~ + +--- src/suncalc.cpp.orig 2018-08-25 18:51:49 UTC ++++ src/suncalc.cpp +@@ -25,8 +25,6 @@ + #include "suncalc.h" + #include "services.h" + +-namespace suncalc +-{ + + /* + SUNRISET.C - computes Sun rise/set times, start/end of twilight, and +@@ -49,6 +47,9 @@ Released to the public domain by Paul Schlyter, Decemb + #include <stdlib.h> + #include <getopt.h> + #include <string.h> ++ ++namespace suncalc ++{ + + /* A macro to compute the number of days elapsed since 2000 Jan 0.0 */ + /* (which is equal to 1999 Dec 31, 0h UT) */ |