diff --git a/libraries/AP_HAL/AP_HAL_Macros.h b/libraries/AP_HAL/AP_HAL_Macros.h index 25e124af66..20039cdb2f 100644 --- a/libraries/AP_HAL/AP_HAL_Macros.h +++ b/libraries/AP_HAL/AP_HAL_Macros.h @@ -6,7 +6,7 @@ macros to allow code to build on multiple platforms more easily */ -#if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX || HAL_WITH_EKF_DOUBLE || (CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS && AP_SIM_ENABLED) +#if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX || HAL_WITH_EKF_DOUBLE || AP_SIM_ENABLED /* allow double maths on Linux and SITL to avoid problems with system headers */ diff --git a/libraries/AP_HAL/utility/Socket_native.h b/libraries/AP_HAL/utility/Socket_native.h index e3514ded0c..43708cd51b 100644 --- a/libraries/AP_HAL/utility/Socket_native.h +++ b/libraries/AP_HAL/utility/Socket_native.h @@ -12,7 +12,7 @@ #define AP_NETWORKING_SOCKETS_ENABLED 1 #endif #include "Socket.hpp" -#else +#elif !AP_SIM_ENABLED #error "attempt to use Socket_native.h without native sockets" #endif