mirror of https://github.com/xzeldon/htop.git
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) {
|
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];
|
char buffer[2048];
|
||||||
size_t size = sizeof(buffer);
|
size_t size = sizeof(buffer);
|
||||||
if (sysctl(mib, 3, buffer, &size, NULL, 0) != 0) {
|
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 intrPeriod;
|
||||||
unsigned long long int idlePeriod;
|
unsigned long long int idlePeriod;
|
||||||
|
|
||||||
int cpuIndex;
|
unsigned int cpuIndex;
|
||||||
} CPUData;
|
} CPUData;
|
||||||
|
|
||||||
typedef struct OpenBSDProcessList_ {
|
typedef struct OpenBSDProcessList_ {
|
||||||
|
|
Loading…
Reference in New Issue