python: fix i686 semaphore lock

Fixes building qt5 for i686.
This commit is contained in:
Jürgen Buchmüller 2017-03-05 04:18:08 +01:00
parent dc662f6148
commit 732663da24
2 changed files with 3 additions and 2 deletions

View file

@ -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) {

View file

@ -4,7 +4,7 @@
#
pkgname=python
version=2.7.13
revision=2
revision=3
wrksrc="Python-${version}"
hostmakedepends="pkg-config"
makedepends="