diff --git a/0001-vecmathlib-fix-building-with-c-11.patch b/0001-vecmathlib-fix-building-with-c-11.patch new file mode 100644 index 0000000..e42630f --- /dev/null +++ b/0001-vecmathlib-fix-building-with-c-11.patch @@ -0,0 +1,55 @@ +From 1daad919ab48a5ca94e1d114cf1cb1ab0e120569 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Sun, 14 Feb 2016 14:05:02 +0100 +Subject: [PATCH] vecmathlib: fix building with c++11 + +Signed-off-by: Igor Gnatenko +--- + lib/kernel/vecmathlib/floattypes.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/lib/kernel/vecmathlib/floattypes.h b/lib/kernel/vecmathlib/floattypes.h +index fa4cc44..0de32c6 100644 +--- a/lib/kernel/vecmathlib/floattypes.h ++++ b/lib/kernel/vecmathlib/floattypes.h +@@ -39,6 +39,9 @@ using namespace std; + __attribute__((__unused__)) + #endif + ++// In C++11 it is functions, not macro ++#if __cplusplus < 201103L ++ + // Capture libc macros, then undefine them + #ifndef isfinite + #error "isfinite is not a macro" +@@ -56,6 +59,8 @@ using namespace std; + #error "signbit is not a macro" + #endif + ++#endif ++ + namespace { + template inline int libc_isfinite(T x) { return isfinite(x); } + template inline int libc_isinf(T x) { return isinf(x); } +@@ -64,6 +69,9 @@ template inline int libc_isnormal(T x) { return isnormal(x); } + template inline int libc_signbit(T x) { return signbit(x); } + } + ++// In C++11 it is functions, not macro ++#if __cplusplus < 201103L ++ + // Include this before undefining the macros below + #include + +@@ -73,6 +81,8 @@ template inline int libc_signbit(T x) { return signbit(x); } + #undef isnormal + #undef signbit + ++#endif ++ + namespace vml_std { + + // Make some type definitions from stdint.h available in std +-- +2.7.1 +