- client/lib: compile fixes for OpenBSD

svn path=/trunk/boinc/; revision=13821
This commit is contained in:
David Anderson 2007-10-10 15:57:59 +00:00
parent d501a9e505
commit fde3a60e13
4 changed files with 19 additions and 0 deletions

View File

@ -9392,3 +9392,12 @@ David 9 Oct 2007
team_edit_action.php
tools/
update_versions
David 10 Oct 2007
- client/lib: compile fixes for OpenBSD
client/
hostinfo_unix.C
log_flags.C
lib/
util.C

View File

@ -644,6 +644,14 @@ int HOST_INFO::get_host_info() {
int mem_size;
getsysinfo( GSI_PHYSMEM, (caddr_t) &mem_size, sizeof( mem_size));
m_nbytes = 1024.* (double)mem_size;
#elif defined(HW_PHYSMEM)
// for OpenBSD
mib[0] = CTL_HW;
int mem_size;
mib[1] = HW_PHYSMEM;
len = sizeof(mem_size);
sysctl(mib, 2, &mem_size, &len, NULL, 0);
m_nbytes = mem_size;
#else
#error Need to specify a method to get memory size
#endif

View File

@ -27,6 +27,7 @@
#include "config.h"
#include <cstdio>
#include <cstring>
#include <unistd.h>
#endif
#include "error_numbers.h"

View File

@ -43,6 +43,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <signal.h>
#include <fcntl.h>
#include <grp.h>
#include <errno.h>