From aba9f51fef647046c7da46309b19e2315fb5b8d4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 3 Apr 2014 21:16:37 +0100 Subject: [PATCH] stmhal: #undef log2f if it's defined. --- stmhal/math.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stmhal/math.c b/stmhal/math.c index 534389df51..61ba7280ea 100644 --- a/stmhal/math.c +++ b/stmhal/math.c @@ -64,6 +64,10 @@ float sqrtf(float x) { // TODO we need import these functions from some library (eg musl or newlib) float powf(float x, float y) { return 0.0; } float logf(float x) { return 0.0; } +// some compilers define log2f in terms of logf +#ifdef log2f +#undef log2f +#endif float log2f(float x) { return 0.0; } float log10f(float x) { return 0.0; } float tanhf(float x) { return 0.0; }