fixed a crash on OpenBSD 6.2 when opening kvm #11

version bump
This commit is contained in:
Bjango
2018-03-29 07:59:31 +11:00
parent a161a8be42
commit a8b752c9cf
4 changed files with 12 additions and 4 deletions

View File

@@ -103,7 +103,11 @@ void Stats::prepare()
#ifdef HAVE_LIBKVM
kvm_t *kd;
if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL)) != NULL)
#if defined(__NetBSD__) || defined(__OpenBSD__)
if ((kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open")) != NULL)
#else
if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) != NULL)
#endif
{
cpuStats.kd = kd;
loadStats.kd = kd;

View File

@@ -35,8 +35,8 @@
#include <time.h>
#include <stdio.h>
#define SERVER_VERSION 3.02
#define SERVER_BUILD 104
#define SERVER_VERSION 3.03
#define SERVER_BUILD 105
#define PROTOCOL_VERSION 3
#define HISTORY_SIZE 600