diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-01-08 08:44:39 +0000 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-01-08 08:44:39 +0000 |
commit | fd43f194ec5a1a0aab450023b6bd7625464b45a9 (patch) | |
tree | 09851ca1a4e3b2b41599c1a5af2957cc0cdf3cde | |
parent | c397447cace6123873997836b703d268bc23ed24 (diff) | |
download | psutil-fd43f194ec5a1a0aab450023b6bd7625464b45a9.tar.gz |
#557 fix cpu_times() on NetBSD
-rw-r--r-- | psutil/_psutil_bsd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/psutil/_psutil_bsd.c b/psutil/_psutil_bsd.c index 6c194e8b..dcdf80f9 100644 --- a/psutil/_psutil_bsd.c +++ b/psutil/_psutil_bsd.c @@ -487,7 +487,11 @@ psutil_proc_memory_info(PyObject *self, PyObject *args) { */ static PyObject * psutil_cpu_times(PyObject *self, PyObject *args) { +#if defined(__NetBSD__) + u_int64_t cpu_time[CPUSTATES]; +#else long cpu_time[CPUSTATES]; +#endif size_t size = sizeof(cpu_time); int ret; |