Skip to content

Commit

Permalink
Attempt to "Fix" OpenBSD Build
Browse files Browse the repository at this point in the history
Co-authored-by: Benny Baumann <BenBE@geshi.org>
  • Loading branch information
time-killer-games and BenBE committed Jan 6, 2024
1 parent 278ebbb commit 1514004
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions openbsd/OpenBSDMachine.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Machine* Machine_new(UsersTable* usersTable, uid_t userId) {

Machine_init(super, usersTable, userId);

OpenBSDProcessList_updateCPUcount(this);
OpenBSDMachine_updateCPUcount(this);

size = sizeof(this->fscale);
if (sysctl(fmib, 2, &this->fscale, &size, NULL, 0) < 0) {
Expand All @@ -114,7 +114,7 @@ Machine* Machine_new(UsersTable* usersTable, uid_t userId) {

this->cpuSpeed = -1;

return this;
return super;
}

void Machine_delete(Machine* super) {
Expand All @@ -129,7 +129,7 @@ void Machine_delete(Machine* super) {
}

static void OpenBSDMachine_scanMemoryInfo(OpenBSDMachine* this) {
Machine* host = &this->super;
Machine* super = &this->super;
const int uvmexp_mib[] = { CTL_VM, VM_UVMEXP };
struct uvmexp uvmexp;
size_t size_uvmexp = sizeof(uvmexp);
Expand Down Expand Up @@ -230,7 +230,7 @@ static void kernelCPUTimesToHtop(const u_int64_t* times, CPUData* cpu) {
}

static void OpenBSDMachine_scanCPUTime(OpenBSDMachine* this) {
Machine* host = &this->super;
Machine* super = &this->super;
u_int64_t kernelTimes[CPUSTATES] = {0};
u_int64_t avg[CPUSTATES] = {0};

Expand Down
2 changes: 1 addition & 1 deletion openbsd/OpenBSDProcessList.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static double getpcpu(const OpenBSDMachine* ohost, const struct kinfo_proc* kp)
}

static void OpenBSDProcessList_scanProcs(OpenBSDProcessList* 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;
Expand Down

0 comments on commit 1514004

Please sign in to comment.