From d4d21e25f3db2af7dc55b4459269d83b726dbe74 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 19 Oct 2023 12:39:13 +1100 Subject: [PATCH] HAL_SITL: use AP_BUILD_ROOT --- libraries/AP_HAL_SITL/SITL_cmdline.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_SITL/SITL_cmdline.cpp b/libraries/AP_HAL_SITL/SITL_cmdline.cpp index 146881c7d13c5..a413c3840c799 100644 --- a/libraries/AP_HAL_SITL/SITL_cmdline.cpp +++ b/libraries/AP_HAL_SITL/SITL_cmdline.cpp @@ -46,6 +46,9 @@ #include #include +#define FORCE_VERSION_H_INCLUDE +#include "ap_version.h" + extern HAL_SITL& hal; using namespace HALSITL; @@ -356,7 +359,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) bool storage_fram_enabled = false; bool erase_all_storage = false; - if (asprintf(&autotest_dir, SKETCHBOOK "/Tools/autotest") <= 0) { + if (asprintf(&autotest_dir, AP_BUILD_ROOT "/Tools/autotest") <= 0) { AP_HAL::panic("out of memory"); } _set_signal_handlers();