From 71021b2d8beb98877fb4646db7e6faf926e30204 Mon Sep 17 00:00:00 2001 From: Samuel Venable Date: Tue, 8 Aug 2023 03:49:54 -0700 Subject: Attempt to "Fix" OpenBSD Build Co-authored-by: Benny Baumann --- openbsd/OpenBSDMachine.c | 4 ++-- openbsd/OpenBSDProcessTable.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'openbsd') diff --git a/openbsd/OpenBSDMachine.c b/openbsd/OpenBSDMachine.c index 0edb90be..0ff893b5 100644 --- a/openbsd/OpenBSDMachine.c +++ b/openbsd/OpenBSDMachine.c @@ -98,7 +98,7 @@ Machine* Machine_new(UsersTable* usersTable, uid_t userId) { Machine_init(super, usersTable, userId); - OpenBSDProcessTable_updateCPUcount(this); + OpenBSDMachine_updateCPUcount(this); size = sizeof(this->fscale); if (sysctl(fmib, 2, &this->fscale, &size, NULL, 0) < 0 || this->fscale <= 0) { @@ -116,7 +116,7 @@ Machine* Machine_new(UsersTable* usersTable, uid_t userId) { this->cpuSpeed = -1; - return this; + return super; } void Machine_delete(Machine* super) { diff --git a/openbsd/OpenBSDProcessTable.c b/openbsd/OpenBSDProcessTable.c index 26c6c52b..f2980a4b 100644 --- a/openbsd/OpenBSDProcessTable.c +++ b/openbsd/OpenBSDProcessTable.c @@ -45,7 +45,7 @@ ProcessTable* ProcessTable_new(Machine* host, Hashtable* pidMatchList) { } void ProcessTable_delete(Object* cast) { - OpenBSDProcessTable* this = (OpenBSDProcessTable*) super; + OpenBSDProcessTable* this = (OpenBSDProcessTable*) cast; ProcessTable_done(&this->super); free(this); } @@ -130,7 +130,7 @@ static double getpcpu(const OpenBSDMachine* ohost, const struct kinfo_proc* kp) } static void OpenBSDProcessTable_scanProcs(OpenBSDProcessTable* this) { - Machine* host = this->super.host; + Machine* host = this->super.super.host; OpenBSDMachine* ohost = (OpenBSDMachine*) host; const Settings* settings = host->settings; const bool hideKernelThreads = settings->hideKernelThreads; -- cgit v1.2.3