- build fixes for OpenBSD, from rustyBSD

This commit is contained in:
David Anderson 2012-11-13 14:58:32 -08:00 committed by Oliver Bock
parent 7768f6da60
commit b4408c9585
3 changed files with 35 additions and 10 deletions

View File

@ -6773,3 +6773,10 @@ David 13 Nov 2012
client/
cs_scheduler.cpp
work_fetch.cpp
David 13 Nov 2012
- build fixes for OpenBSD, from rustyBSD
configure.ac
client/
hostinfo_unix.cpp

View File

@ -1365,15 +1365,8 @@ int HOST_INFO::get_host_info() {
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;
#elif defined(__FreeBSD__)
unsigned int mem_size;
// for OpenBSD & NetBSD & FreeBSD
int mem_size;
mib[0] = CTL_HW;
mib[1] = HW_PHYSMEM;
len = sizeof(mem_size);

View File

@ -602,7 +602,32 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_TYPE_SIGNAL
AC_CHECK_HEADERS(windows.h sys/types.h sys/un.h arpa/inet.h dirent.h grp.h fcntl.h inttypes.h stdint.h malloc.h alloca.h memory.h netdb.h netinet/in.h netinet/tcp.h netinet/ether.h net/if.h net/if_arp.h signal.h strings.h sys/auxv.h sys/file.h sys/fcntl.h sys/ipc.h sys/ioctl.h sys/mount.h sys/msg.h sys/param.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/socket.h sys/stat.h sys/statvfs.h sys/statfs.h sys/swap.h sys/sysctl.h sys/systeminfo.h sys/time.h sys/types.h sys/utsname.h sys/vmmeter.h sys/wait.h unistd.h utmp.h errno.h procfs.h ieeefp.h setjmp.h resolv.h)
AC_CHECK_HEADERS(windows.h sys/types.h sys/un.h arpa/inet.h dirent.h grp.h fcntl.h inttypes.h stdint.h malloc.h alloca.h memory.h netdb.h netinet/in.h netinet/tcp.h netinet/ether.h signal.h strings.h sys/auxv.h sys/file.h sys/fcntl.h sys/ipc.h sys/ioctl.h sys/msg.h sys/param.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/socket.h sys/stat.h sys/statvfs.h sys/statfs.h sys/systeminfo.h sys/time.h sys/types.h sys/utsname.h sys/vmmeter.h sys/wait.h unistd.h utmp.h errno.h procfs.h ieeefp.h setjmp.h)
AC_CHECK_HEADER(net/if.h, [], [], [[
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
]])
AC_CHECK_HEADER(net/if_arp.h, [], [], [[
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
]])
AC_CHECK_HEADERS(sys/sysctl.h sys/mount.h sys/swap.h, [], [], [[
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
]])
AC_CHECK_HEADER(resolv.h, [], [], [[
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
]])
AC_CHECK_HEADERS(netinet/if_ether.h,[],[],[[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>