mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-22 14:22:36 +00:00
Linux: restore Platform compilation with GCC 4.4
Move requester defaults into File's constructor for older compilers. Replace newer string members and select the to_string overload available in CentOS 6's libstdc++.
This commit is contained in:
+7
-4
@@ -64,6 +64,9 @@ namespace VeraCrypt
|
||||
File () : FileIsOpen (false), mFileOpenFlags (FlagsNone), SharedHandle (false), FileHandle (0)
|
||||
#ifndef TC_WINDOWS
|
||||
,AccTime(0), ModTime (0)
|
||||
#endif
|
||||
#ifdef TC_LINUX
|
||||
,RequesterBacked (false), ReleaseOnly (false), RequesterUserId (0), RequesterGroupId (0)
|
||||
#endif
|
||||
{ }
|
||||
virtual ~File ();
|
||||
@@ -132,10 +135,10 @@ namespace VeraCrypt
|
||||
bool OpenAsRequester (const FilePath &path, int sysFlags);
|
||||
void RestoreTimestampsAsRequester () const;
|
||||
|
||||
bool RequesterBacked = false;
|
||||
bool ReleaseOnly = false;
|
||||
uid_t RequesterUserId = 0;
|
||||
gid_t RequesterGroupId = 0;
|
||||
bool RequesterBacked;
|
||||
bool ReleaseOnly;
|
||||
uid_t RequesterUserId;
|
||||
gid_t RequesterGroupId;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
@@ -325,8 +325,8 @@ namespace VeraCrypt
|
||||
bool nixos = false;
|
||||
while (std::getline (contents, line))
|
||||
{
|
||||
if (!line.empty() && line.back() == '\r')
|
||||
line.pop_back();
|
||||
if (!line.empty() && line[line.size() - 1] == '\r')
|
||||
line.erase (line.size() - 1);
|
||||
if (line.compare (0, 3, "ID=") != 0)
|
||||
continue;
|
||||
if (foundId)
|
||||
|
||||
@@ -431,7 +431,7 @@ namespace VeraCrypt
|
||||
return errno;
|
||||
|
||||
// Prepare all allocations before fork; only async-signal-safe calls until exec.
|
||||
const string socketArgument = to_string (sockets[1]);
|
||||
const string socketArgument = to_string (static_cast <long long> (sockets[1]));
|
||||
// AppImage's AppRun supplies the library path used to load this executable.
|
||||
// Preserve that setting only, not the caller's other environment/loader hooks.
|
||||
const char *libraryPath = getenv ("LD_LIBRARY_PATH");
|
||||
|
||||
Reference in New Issue
Block a user