diff --git a/Common/helper_multiprocess.h b/Common/helper_multiprocess.h index 2c09b5e3..a6ecb13c 100644 --- a/Common/helper_multiprocess.h +++ b/Common/helper_multiprocess.h @@ -52,12 +52,22 @@ #include #include #endif -#include #include -inline std::string getSocketFolder() { - return std::filesystem::temp_directory_path().string(); -} +// Simple filesystem compatibility for GCC 7.x +#if defined(__GNUC__) && __GNUC__ < 8 + #include + #include + inline std::string getSocketFolder() { + const char* tmpdir = std::getenv("TMPDIR"); + return tmpdir ? std::string(tmpdir) : "/tmp"; + } +#else + #include + inline std::string getSocketFolder() { + return std::filesystem::temp_directory_path().string(); + } +#endif typedef struct sharedMemoryInfo_st { void *addr;