summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim O'Shea <tim.oshea753@gmail.com>2013-10-10 09:26:23 -0400
committerJohnathan Corgan <johnathan@corganlabs.com>2013-10-12 09:12:13 -0700
commit69e66ef2675fbfa0cbec967590541589cb33c82d (patch)
treed59396fdd8cc26bc174ae91f4a2225ea44a2ecf3
parent273033902106af6d391d824faf97812617f39c6f (diff)
volk: fix for cross-compiling with non-standard toolchains
-rw-r--r--volk/tmpl/volk_cpu.tmpl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/volk/tmpl/volk_cpu.tmpl.c b/volk/tmpl/volk_cpu.tmpl.c
index 71f42f220d..d017c547e0 100644
--- a/volk/tmpl/volk_cpu.tmpl.c
+++ b/volk/tmpl/volk_cpu.tmpl.c
@@ -151,10 +151,16 @@ static int i_can_has_$arch.name (void) {
#end for
#if defined(HAVE_FENV_H)
- #include <fenv.h>
- static inline void set_float_rounding(void){
- fesetround(FE_TONEAREST);
- }
+ #if defined(FE_TONEARREST)
+ #include <fenv.h>
+ static inline void set_float_rounding(void){
+ fesetround(FE_TONEAREST);
+ }
+ #else
+ static inline void set_float_rounding(void){
+ //do nothing
+ }
+ #endif
#elif defined(_MSC_VER)
#include <float.h>
static inline void set_float_rounding(void){