diff --git a/libraries/AP_Networking/lwip_hal/arch/evtimer.c b/libraries/AP_Networking/lwip_hal/arch/evtimer.c new file mode 100644 index 0000000000..53da0413f8 --- /dev/null +++ b/libraries/AP_Networking/lwip_hal/arch/evtimer.c @@ -0,0 +1,10 @@ +/* + wrapper around evtimer.c so we only build when events are + enabled. This prevents a complex check in the ChibiOS mk layer + */ +#include + +#if CH_CFG_USE_EVENTS +#include "../../modules/ChibiOS/os/various/evtimer.c" +#endif + diff --git a/libraries/AP_Networking/wscript b/libraries/AP_Networking/wscript index 4094b6aeaf..97554622a7 100644 --- a/libraries/AP_Networking/wscript +++ b/libraries/AP_Networking/wscript @@ -25,6 +25,10 @@ def configure(cfg): ] extra_src.extend(['libraries/AP_Networking/lwip_hal/arch/*cpp']) + + if cfg.env.BOARD_CLASS == 'ChibiOS': + extra_src.extend(['libraries/AP_Networking/lwip_hal/arch/evtimer.c']) + extra_src_inc.extend(['libraries/AP_Networking/config', 'libraries/AP_Networking/lwip_hal/include'])