From 732663da246b37ccc9ff5f0704672f756d80b5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sun, 5 Mar 2017 04:18:08 +0100 Subject: [PATCH] python: fix i686 semaphore lock Fixes building qt5 for i686. --- srcpkgs/python/patches/fix-i686-semaphore_lock.patch | 3 ++- srcpkgs/python/template | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/python/patches/fix-i686-semaphore_lock.patch b/srcpkgs/python/patches/fix-i686-semaphore_lock.patch index 625e73ef11..19038b013e 100644 --- a/srcpkgs/python/patches/fix-i686-semaphore_lock.patch +++ b/srcpkgs/python/patches/fix-i686-semaphore_lock.patch @@ -10,7 +10,8 @@ which occured only for i686. /* This check is not an absolute guarantee that the semaphore does not rise above maxvalue. */ + int res = sem_getvalue(self->handle, &sval); - if (sem_getvalue(self->handle, &sval) < 0) { +- if (sem_getvalue(self->handle, &sval) < 0) { ++ if (res < 0) { return PyErr_SetFromErrno(PyExc_OSError); - } else if (sval >= self->maxvalue) { + } else if (res == 0 && sval >= self->maxvalue) { diff --git a/srcpkgs/python/template b/srcpkgs/python/template index f25f523bc7..cf9164753a 100644 --- a/srcpkgs/python/template +++ b/srcpkgs/python/template @@ -4,7 +4,7 @@ # pkgname=python version=2.7.13 -revision=2 +revision=3 wrksrc="Python-${version}" hostmakedepends="pkg-config" makedepends="