Commit 8fd5b9a3 by Maarten L. Hekkelman

Remove PATH_MAX to enable compilation on Debian/hurd

parent dffbf52d
...@@ -124,7 +124,8 @@ std::string get_executable_path() ...@@ -124,7 +124,8 @@ std::string get_executable_path()
{ {
using namespace std::literals; using namespace std::literals;
char path[PATH_MAX] = ""; // This used to be PATH_MAX, but lets simply assume 1024 is enough...
char path[1024] = "";
if (readlink("/proc/self/exe", path, sizeof(path)) == -1) if (readlink("/proc/self/exe", path, sizeof(path)) == -1)
throw std::runtime_error("could not get exe path "s + strerror(errno)); throw std::runtime_error("could not get exe path "s + strerror(errno));
return {path}; return {path};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment