AP_HAL: fixed build on g++ 7.3 for stm32

the system maths headers don't like our maths defines, but are happy
if we include math.h first
This commit is contained in:
Andrew Tridgell 2019-09-28 07:54:48 +10:00
parent cf3bd2487b
commit 81711eb28e

View File

@ -13,6 +13,9 @@
#define ALLOW_DOUBLE_MATH_FUNCTIONS
#endif
// we need to include math.h here for newer compilers (eg. g++ 7.3.1 for stm32)
#include <math.h>
#if !defined(ALLOW_DOUBLE_MATH_FUNCTIONS)
/* give warnings if we use double precision maths functions without
specifying ALLOW_DOUBLE_TRIG_FUNCTIONS. Code should use the