From 70a09510ea7c1db313c25a9f569ac03ece2c837f Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Thu, 12 Dec 2019 13:48:33 +0000 Subject: [PATCH] Fix Process on 12.0+ i386 - Bump PORTREVISION for package change FreeBSD 12.0+ change ki_tdev from 32 bits to 64 bits. PR: 242543 Submitted by: antoine --- sysutils/py-psutil/Makefile | 1 + .../files/patch-psutil-_psutil_bsd.c | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c diff --git a/sysutils/py-psutil/Makefile b/sysutils/py-psutil/Makefile index e0797907de90..d1d88d1d5335 100644 --- a/sysutils/py-psutil/Makefile +++ b/sysutils/py-psutil/Makefile @@ -3,6 +3,7 @@ PORTNAME= psutil PORTVERSION= 5.6.7 +PORTREVISION= 1 CATEGORIES= sysutils python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c b/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c new file mode 100644 index 000000000000..7546de3fc06f --- /dev/null +++ b/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c @@ -0,0 +1,23 @@ +--- psutil/_psutil_bsd.c.orig 2019-11-20 08:39:49 UTC ++++ psutil/_psutil_bsd.c +@@ -271,7 +271,11 @@ psutil_proc_oneshot_info(PyObject *self, PyObject *arg + + // Return a single big tuple with all process info. + py_retlist = Py_BuildValue( ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 1200031 ++ "(lillllllLdllllddddlllllbO)", ++#else + "(lillllllidllllddddlllllbO)", ++#endif + #ifdef PSUTIL_FREEBSD + // + (long)kp.ki_ppid, // (long) ppid +@@ -285,7 +289,7 @@ psutil_proc_oneshot_info(PyObject *self, PyObject *arg + (long)kp.ki_groups[0], // (long) effective gid + (long)kp.ki_svuid, // (long) saved gid + // +- kp.ki_tdev, // (int) tty nr ++ kp.ki_tdev, // (int or long long) tty nr + PSUTIL_TV2DOUBLE(kp.ki_start), // (double) create time + // ctx switches + kp.ki_rusage.ru_nvcsw, // (long) ctx switches (voluntary)