aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2016-05-29 23:02:03 +0800
committerdanfe <danfe@FreeBSD.org>2016-05-29 23:02:03 +0800
commit0cf74f30a46685b05398abf745adb76df54b97d8 (patch)
tree60548fc2264b64455b40d2f280726db0c74ecdf8 /graphics
parent4142eb772ca5c44ca77ed43c204fb4a044544ed6 (diff)
downloadfreebsd-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.h9
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