Skip to content

Commit

Permalink
AP_Networking: disable on MacOSX
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Dec 28, 2023
1 parent bd7403f commit dda85e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion libraries/AP_Networking/AP_Networking_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
#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

#ifndef AP_NETWORKING_BACKEND_DEFAULT_ENABLED
Expand Down
6 changes: 5 additions & 1 deletion libraries/AP_Networking/wscript
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit dda85e9

Please sign in to comment.