diff --git a/src/filesystem/path.cc b/src/filesystem/path.cc index a1dcc52..e7607f1 100644 --- a/src/filesystem/path.cc +++ b/src/filesystem/path.cc @@ -3,12 +3,18 @@ #include #include +#ifndef PATH_MAX +#define PATH_MAX_SZ 4096 +#else +#define PATH_MAX_SZ PATH_MAX +#endif + namespace sled { Path Path::Current() { - char tmp_path[PATH_MAX]; - if (getcwd(tmp_path, PATH_MAX)) { + char tmp_path[PATH_MAX_SZ]; + if (getcwd(tmp_path, PATH_MAX_SZ)) { auto cwd = Path(tmp_path); return cwd; }