Try to fix linux compilation.

This commit is contained in:
hiker 2017-04-25 01:14:47 +10:00
parent ffca9b14d8
commit 92709b2ada

View File

@ -119,9 +119,9 @@ Steam::~Steam()
/** Starts ssm.exe as a child process and sets up communication via pipes. /** Starts ssm.exe as a child process and sets up communication via pipes.
* \return True if the child process creation was successful. * \return True if the child process creation was successful.
*/ */
#ifdef WIN32
bool Steam::createChildProcess() bool Steam::createChildProcess()
{ {
#ifdef WIN32
TCHAR command_line[] = TEXT("ssm.exe 1"); TCHAR command_line[] = TEXT("ssm.exe 1");
PROCESS_INFORMATION piProcInfo; PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo; STARTUPINFO siStartInfo;
@ -164,16 +164,17 @@ bool Steam::createChildProcess()
CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hProcess);
CloseHandle(piProcInfo.hThread); CloseHandle(piProcInfo.hThread);
#endif
return true; return true;
} // createChildProcess } // createChildProcess
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
/** Reads a command from the input pipe. /** Reads a command from the input pipe.
*/ */
std::string Steam::getLine() std::string Steam::getLine()
{ {
#ifdef WIN32
#define BUFSIZE 1024 #define BUFSIZE 1024
char buffer[BUFSIZE]; char buffer[BUFSIZE];
DWORD bytes_read; DWORD bytes_read;
@ -186,6 +187,7 @@ std::string Steam::getLine()
std::string s = buffer; std::string s = buffer;
return s; return s;
} }
#endif
return std::string(""); return std::string("");
} // getLine } // getLine