diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-02-10 14:25:46 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-02-10 14:25:46 +0100 |
commit | adffc6f72a7f9350c5a6245305f5ffac2fbba2f0 (patch) | |
tree | c4cb8fb728daf4dd5fe6536f27a386c1afcf900c | |
parent | a23477c0e9cc2fb0cf4b385beefd937b61d204a9 (diff) | |
parent | 2de7a08e35545d250877b2cc93bbfaaa8e25ca0d (diff) | |
download | psutil-adffc6f72a7f9350c5a6245305f5ffac2fbba2f0.tar.gz |
Merge pull request #764 from 0-wiz-0/master
NetBSD-6.x fixes for psutil
-rw-r--r-- | HISTORY.rst | 1 | ||||
-rw-r--r-- | psutil/_psutil_bsd.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index 5be3772f..30fd1eec 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -30,6 +30,7 @@ Bug tracker at https://github.com/giampaolo/psutil/issues - #754: [Linux] cmdline() can be wrong in case of zombie process. - #759: [Linux] Process.memory_maps() may return paths ending with " (deleted)" - #761: [Windows] psutil.boot_time() wraps to 0 after 49 days. +- #764: [NetBSD] fix compilation on NetBSD-6.x. 3.4.2 - 2016-01-20 diff --git a/psutil/_psutil_bsd.c b/psutil/_psutil_bsd.c index fbd4f0ef..fa596d34 100644 --- a/psutil/_psutil_bsd.c +++ b/psutil/_psutil_bsd.c @@ -96,6 +96,9 @@ #include <utmpx.h> #include <sys/vnode.h> // for VREG #include <sys/sched.h> // for CPUSTATES & CP_* + #ifndef DTYPE_VNODE + #define DTYPE_VNODE 1 + #endif #endif @@ -706,8 +709,10 @@ psutil_disk_partitions(PyObject *self, PyObject *args) { strlcat(opts, ",relatime", sizeof(opts)); if (flags & MNT_IGNORE) strlcat(opts, ",ignore", sizeof(opts)); +#if defined(MNT_DISCARD) if (flags & MNT_DISCARD) strlcat(opts, ",discard", sizeof(opts)); +#endif if (flags & MNT_EXTATTR) strlcat(opts, ",extattr", sizeof(opts)); if (flags & MNT_LOG) |