diff options
author | danfe <danfe@FreeBSD.org> | 2016-05-29 23:02:03 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2016-05-29 23:02:03 +0800 |
commit | 0cf74f30a46685b05398abf745adb76df54b97d8 (patch) | |
tree | 60548fc2264b64455b40d2f280726db0c74ecdf8 /graphics | |
parent | 4142eb772ca5c44ca77ed43c204fb4a044544ed6 (diff) | |
download | freebsd-ports-graphics-0cf74f30a46685b05398abf745adb76df54b97d8.tar.gz freebsd-ports-graphics-0cf74f30a46685b05398abf745adb76df54b97d8.tar.zst freebsd-ports-graphics-0cf74f30a46685b05398abf745adb76df54b97d8.zip |
Disable some overloaded math functions for libc++ 3.8.0 and higher, and thus
unbreak the build.
This is because this port defines its own versions of a number of <cmath>
functions, which cause the ambiguity. These functions are only declared in
<cmath> for libc++ 3.8.0 and later, so fix it by disabling the custom
functions for those versions of libc++.
PR: 209652
Submitted by: dim
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/embree/files/patch-common_math_math.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/graphics/embree/files/patch-common_math_math.h b/graphics/embree/files/patch-common_math_math.h index 1b810996999..bb1cfc4612b 100644 --- a/graphics/embree/files/patch-common_math_math.h +++ b/graphics/embree/files/patch-common_math_math.h @@ -1,5 +1,14 @@ --- common/math/math.h.orig 2016-05-20 05:45:13 UTC +++ common/math/math.h +@@ -83,7 +83,7 @@ namespace embree + return _mm_cvtss_f32(c); + } + +-#if !defined(__WIN32__) ++#if !defined(__WIN32__) && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 3800) + __forceinline float abs ( const float x ) { return ::fabsf(x); } + __forceinline float acos ( const float x ) { return ::acosf (x); } + __forceinline float asin ( const float x ) { return ::asinf (x); } @@ -179,7 +179,7 @@ namespace embree } #endif |