AP_Networking: disable on MacOSX

This commit is contained in:
Andrew Tridgell 2023-12-28 09:08:19 +11:00
parent f4e731781d
commit ab24d8768f
2 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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',