summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten-B <99562466+Torsten-B@users.noreply.github.com>2022-06-24 13:18:39 +0200
committerGitHub <noreply@github.com>2022-06-24 13:18:39 +0200
commit375214708b61cf2c7f671c0855484d81e62a2bdd (patch)
tree6abc1b12e97c1e93b5faeb7876a8be2cc2011366
parent5ca68709c44885f6902820e8dcb9fcff1cc1e33b (diff)
downloadpsutil-375214708b61cf2c7f671c0855484d81e62a2bdd.tar.gz
Implicitly include <sys/param.h> so that __FreeBSD_version checks wor… (#2114)
-rw-r--r--CREDITS3
-rw-r--r--HISTORY.rst5
-rw-r--r--psutil/arch/freebsd/mem.c1
-rw-r--r--psutil/arch/freebsd/proc_socks.c1
-rw-r--r--psutil/arch/freebsd/sys_socks.c1
5 files changed, 11 insertions, 0 deletions
diff --git a/CREDITS b/CREDITS
index 36b04a14..61e75453 100644
--- a/CREDITS
+++ b/CREDITS
@@ -786,3 +786,6 @@ I: 2039
N: Hugo van Kemenade
W: https://github.com/hugovk
I: 2099
+
+N: Torsten Blum
+I: 2114
diff --git a/HISTORY.rst b/HISTORY.rst
index d91cf461..c270f7d5 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,5 +1,10 @@
*Bug tracker at https://github.com/giampaolo/psutil/issues*
+**Bug fixes**
+
+- 2113, [FreeBSD]: __FreeBSD_version used in mem.c without including
+ <sys/param.h>
+
5.9.1
=====
diff --git a/psutil/arch/freebsd/mem.c b/psutil/arch/freebsd/mem.c
index f5374ef4..3326f63a 100644
--- a/psutil/arch/freebsd/mem.c
+++ b/psutil/arch/freebsd/mem.c
@@ -6,6 +6,7 @@
#include <Python.h>
+#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <vm/vm_param.h>
diff --git a/psutil/arch/freebsd/proc_socks.c b/psutil/arch/freebsd/proc_socks.c
index cdf5770b..737467a8 100644
--- a/psutil/arch/freebsd/proc_socks.c
+++ b/psutil/arch/freebsd/proc_socks.c
@@ -8,6 +8,7 @@
*/
#include <Python.h>
+#include <sys/param.h>
#include <sys/user.h>
#include <sys/socketvar.h> // for struct xsocket
#include <sys/un.h>
diff --git a/psutil/arch/freebsd/sys_socks.c b/psutil/arch/freebsd/sys_socks.c
index 9f7cf8d5..56c89724 100644
--- a/psutil/arch/freebsd/sys_socks.c
+++ b/psutil/arch/freebsd/sys_socks.c
@@ -10,6 +10,7 @@
*/
#include <Python.h>
+#include <sys/param.h>
#include <sys/user.h>
#include <sys/file.h>
#include <sys/socketvar.h> // for struct xsocket