diff options
author | anthk <anthk@texto-plano.xyz> | 2021-03-11 09:40:02 +0000 |
---|---|---|
committer | anthk <anthk@texto-plano.xyz> | 2021-03-11 09:40:02 +0000 |
commit | 5b21c81d6870e72629d3b12756e14a60bdc5261b (patch) | |
tree | d617edb6a939a19db9bb57216c380fb8618ebea9 /src/process_iterator.h | |
parent | d252394bc86670e39f8a9c5c52875b13645764af (diff) | |
download | cpulimit-5b21c81d6870e72629d3b12756e14a60bdc5261b.tar.gz |
Diffstat (limited to 'src/process_iterator.h')
-rw-r--r-- | src/process_iterator.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/process_iterator.h b/src/process_iterator.h index 70520b6..84668b5 100644 --- a/src/process_iterator.h +++ b/src/process_iterator.h @@ -27,6 +27,7 @@ #include <limits.h> #include <dirent.h> + //USER_HZ detection, from openssl code #ifndef HZ # if defined(_SC_CLK_TCK) \ @@ -49,6 +50,11 @@ #include <kvm.h> #endif +#ifdef __OpenBSD__ +#include <fcntl.h> +#include <kvm.h> +#endif + // process descriptor struct process { //pid of the process @@ -75,7 +81,7 @@ struct process_iterator { #ifdef __linux__ DIR *dip; int boot_time; -#elif defined __FreeBSD__ +#elif ( defined __FreeBSD__) || (defined __OpenBSD__ ) kvm_t *kd; struct kinfo_proc *procs; int count; |