- VBOX: Fix build breaks for Linux and Mac.

samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=25143
This commit is contained in:
Rom Walton 2012-01-24 23:36:10 +00:00
parent 37fa2267c1
commit dbe896f3cb
2 changed files with 10 additions and 2 deletions

View File

@ -977,3 +977,9 @@ Rom 24 Jan 2012
client/
http_curl.cpp
Rom 24 Jan 2012
- VBOX: Fix build breaks for Linux and Mac.
samples/vboxwrapper/
vbox.cpp

View File

@ -1062,7 +1062,9 @@ int VBOX_VM::get_vm_log(string& log) {
int VBOX_VM::get_vm_exit_code(unsigned long& exit_code) {
#ifndef _WIN32
waitpid(vm_pid, &exit_code, WNOHANG);
int ec = 0;
waitpid(vm_pid, &ec, WNOHANG);
exit_code = ec;
#else
GetExitCodeProcess(vm_pid_handle, &exit_code);
#endif
@ -1307,7 +1309,7 @@ int VBOX_VM::write_floppy(std::string& data) {
void VBOX_VM::reset_vm_process_priority() {
#ifndef _WIN32
if (vm_pid) {
setpriority(PRIO_PROCESS, vm_pid, PROCESS_LOW_PRIORITY);
setpriority(PRIO_PROCESS, vm_pid, PROCESS_IDLE_PRIORITY);
}
#else
if (vm_pid_handle) {