diff options
Diffstat (limited to 'source/Host/common/Host.cpp')
-rw-r--r-- | source/Host/common/Host.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/Host/common/Host.cpp b/source/Host/common/Host.cpp index 94c78a015651d..e89f4def478cb 100644 --- a/source/Host/common/Host.cpp +++ b/source/Host/common/Host.cpp @@ -143,7 +143,11 @@ private: #endif // __linux__ #ifdef __linux__ +#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)) +static __thread volatile sig_atomic_t g_usr1_called; +#else static thread_local volatile sig_atomic_t g_usr1_called; +#endif static void SigUsr1Handler (int) @@ -816,8 +820,8 @@ Host::LaunchProcessPosixSpawn(const char *exe_path, const ProcessLaunchInfo &lau #endif const char *tmp_argv[2]; - char * const *argv = (char * const*)launch_info.GetArguments().GetConstArgumentVector(); - char * const *envp = (char * const*)launch_info.GetEnvironmentEntries().GetConstArgumentVector(); + char * const *argv = const_cast<char * const*>(launch_info.GetArguments().GetConstArgumentVector()); + char * const *envp = const_cast<char * const*>(launch_info.GetEnvironmentEntries().GetConstArgumentVector()); if (argv == NULL) { // posix_spawn gets very unhappy if it doesn't have at least the program @@ -825,7 +829,7 @@ Host::LaunchProcessPosixSpawn(const char *exe_path, const ProcessLaunchInfo &lau // variables don't make it into the child process if "argv == NULL"!!! tmp_argv[0] = exe_path; tmp_argv[1] = NULL; - argv = (char * const*)tmp_argv; + argv = const_cast<char * const*>(tmp_argv); } #if !defined (__APPLE__) |