Patch by Nils Maier <maierman@web.de>
Subject: [PATCH] Fix potential busy-waits/deadlocks because of r5491

r5491 removed some special handling of EINVAL from sem.c, which turned
out to cause something what looks like a period of busy waiting followed
by a deadlock in some code using pthreads. Code in question is a library
using ffmpeg as a pthreads caller, without using pthreads itself.

After git-bisecting this to r5491, and adding back the removed lines,
the error goes way.


git-svn-id: https://svn.code.sf.net/p/mingw-w64/code@6366 4407c894-4637-0410-b4f5-ada5f102cad1