From e9dabbbcae38a52a725722c6e3df0dc94c6051ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 24 Oct 2023 22:25:00 +0200 Subject: [PATCH] Include to avoid implicit-function-declaration for close and syscall (#2321) See https://docs.python.org/3.13/whatsnew/3.13.html """ Python.h no longer includes the standard header file. If needed, it should now be included explicitly. For example, it provides the functions: read(), write(), close(), isatty(), lseek(), getpid(), getcwd(), sysconf() and getpagesize(). """ --- psutil/_psutil_sunos.c | 1 + psutil/arch/linux/net.c | 1 + psutil/arch/linux/proc.c | 1 + psutil/arch/solaris/environ.c | 1 + 4 files changed, 4 insertions(+) diff --git a/psutil/_psutil_sunos.c b/psutil/_psutil_sunos.c index 11335993f..54f353c10 100644 --- a/psutil/_psutil_sunos.c +++ b/psutil/_psutil_sunos.c @@ -51,6 +51,7 @@ #include #include #include // fabs() +#include #include "_psutil_common.h" #include "_psutil_posix.h" diff --git a/psutil/arch/linux/net.c b/psutil/arch/linux/net.c index 522a55dfc..d193e9408 100644 --- a/psutil/arch/linux/net.c +++ b/psutil/arch/linux/net.c @@ -10,6 +10,7 @@ #include #include #include +#include // see: https://github.com/giampaolo/psutil/issues/659 #ifdef PSUTIL_ETHTOOL_MISSING_TYPES diff --git a/psutil/arch/linux/proc.c b/psutil/arch/linux/proc.c index ac87af917..b58a3ce2a 100644 --- a/psutil/arch/linux/proc.c +++ b/psutil/arch/linux/proc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "proc.h" #include "../../_psutil_common.h" diff --git a/psutil/arch/solaris/environ.c b/psutil/arch/solaris/environ.c index dd627eb00..4b4e041a4 100644 --- a/psutil/arch/solaris/environ.c +++ b/psutil/arch/solaris/environ.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "environ.h"