mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
OpenBSD: fix compile errors
openbsd/OpenBSDProcessList.c:176:56: error: no member named 'ki_pid' in 'struct kinfo_proc'; did you mean 'p_pid'? const int mib[] = { CTL_KERN, KERN_PROC_CWD, kproc->ki_pid }; ^~~~~~ p_pid /usr/include/sys/sysctl.h:375:10: note: 'p_pid' declared here int32_t p_pid; /* PID_T: Process identifier. */ ^ openbsd/OpenBSDProcessList.c:458:33: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] if (opl->cpus[i].cpuIndex == id) ~~~~~~~~~~~~~~~~~~~~~ ^ ~~
This commit is contained in:
parent
90cc16efc0
commit
f608fc5c8a
@ -173,7 +173,7 @@ static void OpenBSDProcessList_scanMemoryInfo(ProcessList* pl) {
|
||||
}
|
||||
|
||||
static void OpenBSDProcessList_updateCwd(const struct kinfo_proc* kproc, Process* proc) {
|
||||
const int mib[] = { CTL_KERN, KERN_PROC_CWD, kproc->ki_pid };
|
||||
const int mib[] = { CTL_KERN, KERN_PROC_CWD, kproc->p_pid };
|
||||
char buffer[2048];
|
||||
size_t size = sizeof(buffer);
|
||||
if (sysctl(mib, 3, buffer, &size, NULL, 0) != 0) {
|
||||
|
@ -36,7 +36,7 @@ typedef struct CPUData_ {
|
||||
unsigned long long int intrPeriod;
|
||||
unsigned long long int idlePeriod;
|
||||
|
||||
int cpuIndex;
|
||||
unsigned int cpuIndex;
|
||||
} CPUData;
|
||||
|
||||
typedef struct OpenBSDProcessList_ {
|
||||
|
Loading…
Reference in New Issue
Block a user