fix endian issue on s390x/ppc64

This commit is contained in:
Than Ngo 2016-03-11 13:31:56 +01:00
parent ac2bed990d
commit fa0f51adb1
2 changed files with 27 additions and 2 deletions

View File

@ -0,0 +1,21 @@
diff -up psutil-3.2.1/psutil/_psutil_linux.c.than psutil-3.2.1/psutil/_psutil_linux.c
--- psutil-3.2.1/psutil/_psutil_linux.c.than 2016-03-11 06:35:23.200161395 -0500
+++ psutil-3.2.1/psutil/_psutil_linux.c 2016-03-11 06:37:55.010161395 -0500
@@ -272,7 +272,7 @@ psutil_proc_cpu_affinity_get(PyObject *s
cpu_set_t *mask = NULL;
PyObject *py_list = NULL;
- if (!PyArg_ParseTuple(args, "i", &pid))
+ if (!PyArg_ParseTuple(args, "l", &pid))
return NULL;
ncpus = NCPUS_START;
while (1) {
@@ -339,7 +339,7 @@ psutil_proc_cpu_affinity_get(PyObject *s
PyObject* py_retlist = NULL;
PyObject *py_cpu_num = NULL;
- if (!PyArg_ParseTuple(args, "i", &pid))
+ if (!PyArg_ParseTuple(args, "l", &pid))
return NULL;
CPU_ZERO(&cpuset);
if (sched_getaffinity(pid, len, &cpuset) < 0)

View File

@ -9,12 +9,13 @@
Name: python-%{srcname}
Version: 3.2.1
Release: 4%{?dist}
Release: 5%{?dist}
Summary: %{sum}
License: BSD
URL: http://psutil.googlecode.com/
Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
Patch0: python-psutil-endian.patch
BuildRequires: python2-devel
BuildRequires: python3-devel
@ -56,7 +57,7 @@ ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
%prep
%autosetup -n %{srcname}-%{version}
%autosetup -p1 -n %{srcname}-%{version}
# Remove shebangs
for file in psutil/*.py; do
@ -99,6 +100,9 @@ make test-memleaks PYTHON=%{__python3}
%changelog
* Fri Mar 11 2016 Than Ngo <than@redhat.com> - 3.2.1-5
- fix endian issue on s390x/ppc64
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild