Skip to content
Snippets Groups Projects
Commit d0735eae authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Fix SITL Linux compile error

parent e18c4975
No related branches found
No related tags found
No related merge requests found
......@@ -227,7 +227,14 @@ int main(int argc, char **argv)
// Lock this application in the current working dir
// this is not an attempt to secure the environment,
// rather, to replicate a deployed file system.
char pwd_path[PATH_MAX];
#ifdef PATH_MAX
const unsigned path_max_len = PATH_MAX;
#else
const unsigned path_max_len = 1024;
#endif
char pwd_path[path_max_len];
const char *folderpath = "/rootfs/";
if (nullptr == getcwd(pwd_path, sizeof(pwd_path))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment