summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--stmhal/math.c4
1 files changed, 4 insertions, 0 deletions
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; }