diff --git a/libraries/AP_Networking/AP_Networking_Config.h b/libraries/AP_Networking/AP_Networking_Config.h index b0f174618f..ea77791a2b 100644 --- a/libraries/AP_Networking/AP_Networking_Config.h +++ b/libraries/AP_Networking/AP_Networking_Config.h @@ -5,8 +5,14 @@ #define AP_NETWORKING_ENABLED AP_NETWORKING_BACKEND_PPP #endif + #ifndef AP_NETWORKING_ENABLED -#define AP_NETWORKING_ENABLED (((CONFIG_HAL_BOARD == HAL_BOARD_LINUX) || (CONFIG_HAL_BOARD == HAL_BOARD_SITL)) && !defined(__APPLE__)) +#if defined(__APPLE__) || defined(__clang__) +// MacOS can't build lwip, and clang fails on linux +#define AP_NETWORKING_ENABLED 0 +#else +#define AP_NETWORKING_ENABLED ((CONFIG_HAL_BOARD == HAL_BOARD_LINUX) || (CONFIG_HAL_BOARD == HAL_BOARD_SITL)) +#endif #endif #ifndef AP_NETWORKING_BACKEND_DEFAULT_ENABLED diff --git a/libraries/AP_Networking/wscript b/libraries/AP_Networking/wscript index f48864d3cc..4094b6aeaf 100644 --- a/libraries/AP_Networking/wscript +++ b/libraries/AP_Networking/wscript @@ -1,13 +1,17 @@ #!/usr/bin/env python3 import pathlib - +import platform def configure(cfg): if not cfg.env.BOARD_CLASS in ['SITL', 'LINUX', 'ChibiOS']: return + # networking doesn't build on MacOSX or clang + if platform.system() == 'Darwin' or 'clang++' in cfg.env.COMPILER_CXX: + return + extra_src = [ 'modules/lwip/src/core/*c', 'modules/lwip/src/core/ipv4/*c',