From ad3cf2633834f1565f508891cbd7d2566d36a899 Mon Sep 17 00:00:00 2001 From: Rhys Mainwaring Date: Tue, 9 Jan 2024 09:59:26 +0000 Subject: [PATCH] AP_Networking: enable networking on macOS Signed-off-by: Rhys Mainwaring --- libraries/AP_Networking/AP_Networking_Config.h | 4 ++-- libraries/AP_Networking/wscript | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/AP_Networking/AP_Networking_Config.h b/libraries/AP_Networking/AP_Networking_Config.h index b54a8e399f..e815b87b5a 100644 --- a/libraries/AP_Networking/AP_Networking_Config.h +++ b/libraries/AP_Networking/AP_Networking_Config.h @@ -7,8 +7,8 @@ #ifndef AP_NETWORKING_ENABLED -#if defined(__APPLE__) || defined(__clang__) -// MacOS can't build lwip, and clang fails on linux +#if !defined(__APPLE__) && defined(__clang__) +// 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)) diff --git a/libraries/AP_Networking/wscript b/libraries/AP_Networking/wscript index 97554622a7..454a350ba2 100644 --- a/libraries/AP_Networking/wscript +++ b/libraries/AP_Networking/wscript @@ -8,9 +8,9 @@ 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 + # networking doesn't build with clang unless using macOS + if platform.system() != 'Darwin' and 'clang++' in cfg.env.COMPILER_CXX: + return extra_src = [ 'modules/lwip/src/core/*c',