diff options
| author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-09-08 20:31:27 +0000 |
|---|---|---|
| committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-09-08 20:31:27 +0000 |
| commit | a3fbf36004080f0302c220d8074f0bd939068032 (patch) | |
| tree | e2f9738772147e3e7e1ac160d8820fe4666429c6 /llvm/lib/System/Unix | |
| parent | 5b5559b272912394b8a92d35bb2e89b8c5dcc582 (diff) | |
| download | bcm5719-llvm-a3fbf36004080f0302c220d8074f0bd939068032.tar.gz bcm5719-llvm-a3fbf36004080f0302c220d8074f0bd939068032.zip | |
This should unbreak the build on 64-bit Linux.
llvm-svn: 81252
Diffstat (limited to 'llvm/lib/System/Unix')
| -rw-r--r-- | llvm/lib/System/Unix/Program.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc index f5290b4075c..1ffd71af10d 100644 --- a/llvm/lib/System/Unix/Program.inc +++ b/llvm/lib/System/Unix/Program.inc @@ -39,7 +39,8 @@ Program::Program() : Data_(0) {} Program::~Program() {} unsigned Program::GetPid() const { - return reinterpret_cast<unsigned>(Data_); + uint64_t pid = reinterpret_cast<uint64_t>(Data_); + return static_cast<unsigned>(pid); } // This function just uses the PATH environment variable to find the program. @@ -241,7 +242,8 @@ Program::Wait(unsigned secondsToWait, // Parent process: Wait for the child process to terminate. int status; - pid_t child = reinterpret_cast<pid_t>(Data_); + uint64_t pid = reinterpret_cast<uint64_t>(Data_); + pid_t child = static_cast<pid_t>(pid); while (wait(&status) != child) if (secondsToWait && errno == EINTR) { // Kill the child. @@ -294,7 +296,8 @@ Program::Kill(std::string* ErrMsg) { return true; } - pid_t pid = reinterpret_cast<pid_t>(Data_); + uint64_t pid64 = reinterpret_cast<uint64_t>(Data_); + pid_t pid = static_cast<pid_t>(pid64); return (kill(pid, SIGKILL) == 0); } |

